[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging Elisp
From: |
Sebastien Vauban |
Subject: |
Re: Debugging Elisp |
Date: |
Sat, 25 May 2013 21:00:40 +0200 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt) |
Hi Pascal,
"Pascal J. Bourguignon" wrote:
> Miguel Guedes <miguel.a.guedes@gmail.com> writes:
>
>> Is it possible to set up emacs so as to output more meaningful messages
>> when it steps into errors?
>>
>> I'd be so *very* grateful if someone contributed a tip that makes emacs
>> output a line:col pair when it steps into an error as messages of the
>> kind below are just so frustrating to debug (especially so when it's hard
>> to replicate what causes them):
>>
>> Error in post-command-hook: (wrong-type-argument characterp wrong-type-
>> argument)
>
> M-x set-variable RET debug-on-error RET t RET
>
> Now, in post-command-hooks, when there's an error, the hook is removed
> IIRC, so you have to put it back in, or invoke it separately to debug
> it.
What you say here resonates to me. I have the impression (from pragmatic
observations) that `toggle-debug-on-error' just shows the next first error,
then none. While `M-: (setq debug-on-error t)' will work forever.
The feature with `toggle-debug-on-error' is, for me, quite new. I thought it
was some kind of bug. You say it has been done on purpose. I find that very
strange: when I toggle, I know what I'm doing; if I don't want it anymore, I
toggle another time.
Your explanation clears my mind...
Best regards,
Seb
--
Sebastien Vauban