0

I just started out on emacs so this might have a really simple answer. I'm getting an error message on startup and have no idea what it means. The debug message doesn't help much either.

What do these messages mean and how can I rectify the error?

I'm on emacs 24.4.1, Debian 8.

When starting up emacs I get the following error:

Warning (initialization): An error occurred while loading `/home/user/.emacs.d/init.el':

Symbol's value as variable is void: elpy-modules

Looking through my .emacs/init.el, I can't find anything what looks like a variable called elpy-module (however I don't know lisp, so perhaps that's part of the issue).

When starting with emacs --debug-init I get:

Debugger entered--Lisp error: (void-variable elpy-modules)
  (delq (quote elpy-module-flymake) elpy-modules)
  (setq elpy-modules (delq (quote elpy-module-flymake) elpy-modules))
  (progn (setq elpy-modules (delq (quote elpy-module-flymake) elpy-modules)) (add-hook (quote elpy-mode-hook) (quote flycheck-mode)))
  (if (require (quote flycheck) nil t) (progn (setq elpy-modules (delq (quote elpy-module-flymake) elpy-modules)) (add-hook (quote elpy-mode-hook) (quote flycheck-mode))))
  eval-buffer(#<buffer  *load*> nil "/home/user/.emacs.d/init.el" nil t)  ; Reading at buffer position 1923
  load-with-code-conversion("/home/user/.emacs.d/init.el" "/home/user/.emacs.d/init.el" t t)
  load("/home/user/.emacs.d/init" t t)
  #[0 "\205\262

1 Answer 1

3

Your init file needs to load the code that defines elpy-mode before it does the code that uses elpy-mode (i.e., before the (if (require 'flycheck)...)).

You need to add (require 'elpy) before that if code (assuming that the library that defines elpy-mode is elpy.el.

1
  • Great! Thanks for that... I feel that it take me a while until I got emacs fully configured... :)
    – pandita
    Feb 6, 2016 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.