当我打开一个空的 haskell 文件并激活时haskell-mode
,我收到消息
user-error: No items suitable for an index found in this buffer
如果我做同样的事情,但事先打电话,我会收到同样的消息:当发出信号toggle-debug-on-error
时它不会进入调试器。user-error
我如何让 emacs 进入调试器user-error
?
答案1
好问题! 答案是user-error
从选项中删除debug-ignored-errors
。 M-x customize-option debug-ignored-errors
,并删除的条目user-error
。
但是,在我看来,Emacs 手册应该对此保持透明,但事实并非如此。甚至 Elisp 手册也没有明确说明这一点——唯一的提示是在 option 的描述中顺便提到了这一点debug-ignored-errors
:
这个变量的正常值包括
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 set
“debug-ignored-errors”到“nil”。
我已经提交了Emacs 错误 #18005查找缺失的文档。