Skip to content

"void-variable ess-r-customize-alist" when running magit-status in R package dir #1319

@DarwinAwardWinner

Description

@DarwinAwardWinner

ESS is causing me some problems when running magit-status in a directory with an R package:

Debugger entered--Lisp error: (void-variable ess-r-customize-alist)
  #f(compiled-function (var) #<bytecode -0x16f40f72fd077de5>)(ess-dialect)
  mapc(#f(compiled-function (var) #<bytecode -0x16f40f72fd077de5>) (ess-dialect ess-setwd-command ess-getwd-command ess-quit-function inferior-ess-reload-function))
  ess-r-package-mode(1)
  #f(compiled-function () #<bytecode 0x1f799f2b7e20694c>)()
  apply(#f(compiled-function () #<bytecode 0x1f799f2b7e20694c>) nil)
  ess-r-package-auto-activate()
  run-hooks(after-change-major-mode-hook)
  run-mode-hooks(magit-status-mode-hook)
  magit-status-mode()
  magit-setup-buffer-internal(magit-status-mode nil ((magit-buffer-diff-args ("--no-ext-diff")) (magit-buffer-diff-files nil) (magit-buffer-log-args ("-n256" "--decorate")) (magit-buffer-log-files nil)))
  magit-status-setup-buffer("~/Projects/TIM/TIM/")
  magit-status(nil ((9 . 5) (("/Users/thompr21/Projects/TIM/TIM/" . config) . #<hash-table equal 24/24 0x41ed95a9 ...>) (("/Users/thompr21/Projects/TIM/TIM/" . magit-toplevel) . "/Users/thompr21/Projects/TIM/TIM/") (("~/Projects/TIM/TIM/" . magit-toplevel) . "/Users/thompr21/Projects/TIM/TIM/") (("/Users/thompr21/Projects/TIM/TIM/" "rev-parse" "--show-cdup") . "") (("/Users/thompr21/Projects/TIM/TIM/" "rev-parse" "--show-toplevel") . "/Users/thompr21/Projects/TIM/TIM")))
  funcall-interactively(magit-status nil ((9 . 5) (("/Users/thompr21/Projects/TIM/TIM/" . config) . #<hash-table equal 24/24 0x41ed95a9 ...>) (("/Users/thompr21/Projects/TIM/TIM/" . magit-toplevel) . "/Users/thompr21/Projects/TIM/TIM/") (("~/Projects/TIM/TIM/" . magit-toplevel) . "/Users/thompr21/Projects/TIM/TIM/") (("/Users/thompr21/Projects/TIM/TIM/" "rev-parse" "--show-cdup") . "") (("/Users/thompr21/Projects/TIM/TIM/" "rev-parse" "--show-toplevel") . "/Users/thompr21/Projects/TIM/TIM")))
  #<subr call-interactively>(magit-status nil nil)
  apply(#<subr call-interactively> magit-status (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> magit-status nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (magit-status nil nil))
  call-interactively(magit-status nil nil)
  command-execute(magit-status)

Running M-x load-library ess-rd fixes the problem, which makes sense since this is where ess-r-customize-alist is defined.

As for the source of the problem, I see the following line in ess-r-package.el:

;; Silence the byte compiler, OK because this file is only loaded by
;; ess-r-mode and has no autoloads.
(defvar ess-r-customize-alist)

However, this comment makes no sense, because ess-r-mode.el does not define ess-r-customize-alist, nor does it load ess-rd.el. The obvious solution seems to be to delete this defvar and replace it with (require 'ess-rd), but I don't know if that would cause some other problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions