When I open an empty haskell file, which activates haskell-mode, I get the message

user-error: No items suitable for an index found in this buffer

If I do the same thing, but call toggle-debug-on-error beforehand, I get the same message: it doesn't enter the debugger when user-error is signalled.

How do I make emacs enter the debugger on user-error?

1 Answer 1


Good question! The answer is to remove user-error from option debug-ignored-errors. M-x customize-option debug-ignored-errors, and remove the entry for user-error.

However, IMO the Emacs manual should be transparent about this, and it is not. Even the Elisp manual is not clear about this -- the only hint is this mention in passing, within the description of option debug-ignored-errors:

The normal value of this variable includes user-error', as well as several errors that happen often during editing but rarely result from bugs in Lisp programs. However, "rarely" is not "never"; if your program fails with an error that matches this list, you may try changing this list to debug the error. The easiest way is usually to setdebug-ignored-errors' to `nil'.

FWIW, I've submitted Emacs bug #18005 for the missing doc.

  • Thank you. Setting debug-ignored-errors to nil solved the problem.
    – Kirill
    Jul 12, 2014 at 18:17
  • 2
    FWIW, Emacs Dev closed the doc bug I reported for this, as wont-fix. But RMS just posted a reply in the bug thread, agreeing with me.
    – Drew
    Jul 13, 2014 at 22:04

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.