In my emacs, i have set (debug-on-error t) to see the error's stacktrace. It is very helpful but for mundane errors, it becomes annoying... One such error is,

Debugger entered--Lisp error: (error "Command attempted to use minibuffer while in minibuffer")
  read-from-minibuffer("Goto line: " nil nil nil nil ("1"))

Emacs has provided a way to suppress backtrace prints on such errors using the variable, debug-ignored-errors. It takes a list of error codes. Say for the error that the variable has no value - the code is '(void-variable).

Where do i find the error codes for all the other stacktrace messages?

  • For this particular error, if you'd like Emacs not to stop you from using the minibuffer while in minibuffer, you can set enable-recursive-minibuffers to t. – legoscia Apr 23 '15 at 11:27

debug-ignored-errors can hold signal names (e.g. user-error) but also regular expressions. So try:

(push "\\`Command attempted to use minibuffer while in minibuffer"

But you might also like to report this issue as a bug. This error should probably be changed to a user-error so you don't need to change debug-ignored-errors yourself.

  • but user-error will suppress many errors right? i wanted to suppress only this error, because this error is just a typo mistake, and not an error as such.... – Madhavan Apr 22 '15 at 21:02
  • I'm not suggesting to add user-error to debug-ignored-errors (it's already there by default right now), but to make this particular error use user-error (so that it gets ignored by default). – Stefan Apr 22 '15 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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