reddit / emacs

Debugging Elisp: debug-on-message - How to make it work?

pragmat1c1 · 2022-05-16 12:12
I am having trouble pinpointing an error. When I hit "L" for follow-mode in org-agenda, I see the message " Wrong number of arguments: (0 . 0), 1" in the \*Messages\* buffer and in the "echo area". Now running "edebug-defun" in the function definition for "org-agenda-follow-mode" and stepping through the code, I don't see any error. I am guessing that the error stems from another function, a hook or adviced function. But I don't know where. So I checked this: [https://www.gnu.org/software/emacs/manual/html\_node/elisp/Error-Debugging.html](https://www.gnu.org/software/emacs/manual/html_node/elisp/Error-Debugging.html) and tried (setq debug-on-message "Wrong number of arguments: (0 . 0), 1") still the debugger is not entered. How else can I trigger the debugger to pinpoint the source of the error?
_viz_ · 2022-05-16 12:14
toggle-debug-on-error?
pragmat1c1 · 2022-05-16 12:15
Just did, but apparently the message ("Wrong number of arguments: (0 . 0), 1") indicates no error, just a warning? Because the debugger is still not entered. Edit: Restarted Emacs, toggled debug on error, now it works. Thank you viz!