Getting debugger lisp error: (void-variable w)

282 Views Asked by At

Sometimes when I save a file I get a debugger error message in Emacs, it doesn't happen always but happens randomly whenever I save a file. The error message is as follows

Debugger entered--Lisp error: (void-variable w)
  eval(w t)
  eval-expression(w nil nil 127)
  funcall-interactively(eval-expression w nil nil 127)
  #<subr call-interactively>(eval-expression nil nil)
  apply(#<subr call-interactively> eval-expression (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

This happens whenever I save a file by pressing ":" to invoke the evil mode vim command and following it with "w" for saving the file. Also is there any way of turning off this popup? Even if I cannot find the bug is it possible to disable this pop-up debugger error so it never shows up?

1

There are 1 best solutions below

2
Drew On

Sounds like you're maybe hitting a key similar to : and getting command eval-expression, which tries to evaluate something you type next (such as w then RET).

I can't speak for Evil's key bindings, but in vanilla Emacs M-:, not :, is bound in fact to eval-expression. (M- is Alt.)

So if you type M-: w RET instead of : w RET then that might explain what you see: Emacs tries to evaluate the w as a variable, and it's not bound to any value as a variable.