When I start Emacs, I get the error message: Symbol's value as variable is void: n
I am pretty sure, it is just a typo in my init.el, but how can I find it?
Shouldn't there be a debugger, which tells me exactly where this variable n
shows up?
My question is, whether it exists, and if it exists, where it is?
I would also appreciate best practices for debugging the init.el (or elisp in general) and also resources to learn this.
I loaded emacs with --debug-init
and the backtrace gives me:
Debugger entered--Lisp error: (void-variable n)
load-with-code-conversion("/home/xx/.emacs.d/init.el" "/home/xx/.emacs.d/init.el" t t)
load("/home/xx/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode -0xfb4a62eb1ee4990>) #f(compiled-function () #<bytecode -0x1f3c686ddc0ca9b5>) t)
command-line()
normal-top-level()
Which is unhelpful. What does it try to communicate to me?
n
at top level of one of the files that I load when I start emacs and then I invoked emacs withemacs --debug-init
. I got the following message:Debugger entered--Lisp error: (void-variable n) eval-buffer(#<buffer *load*-97476> nil "/some/path/org-config.el" nil t) ; Reading at buffer position 32678
. Opening the file and going to position 32678 (withM-g c 32678
) took me directly to the errantn
. I don't understand why the buffer position is missing from your backtrace. Did you leave it out by any chance?backtrace--print-func-and-args
(since 27.1) and from the comments is specific toeval-buffer
usage -- which is happening in your case, but seemingly not for Sinthoras. Maybeload
is doing something slightly different in different versions/cases?