From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Debugging Elisp Date: Sat, 25 May 2013 21:00:40 +0200 Organization: Sebastien Vauban Message-ID: <86ehcu28br.fsf@somewhere.org> References: <51a08001$0$32589$862e30e2@ngroups.net> <87wqqnjhrw.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369509669 6668 80.91.229.3 (25 May 2013 19:21:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 May 2013 19:21:09 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Sat May 25 21:21:09 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UgK1d-0004YX-L8 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 May 2013 21:21:09 +0200 Original-Received: from localhost ([::1]:39006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgK1d-0000P0-04 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 May 2013 15:21:09 -0400 X-Received: by 10.180.11.239 with SMTP id t15mr1680838wib.3.1369508444651; Sat, 25 May 2013 12:00:44 -0700 (PDT) Original-Path: usenet.stanford.edu!lg1no5167735wic.0!news-out.google.com!fw11ni6338wic.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Injection-Info: mx05.eternal-september.org; posting-host="6f05eaee171434c896d44feeaf7179f0"; logging-data="23737"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18oeHUHX4+MFPyIgq810Co8" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:Yyo/Zr5QmROx0OUtMmNNb0szlk8= sha1:UTGsvflmuJEP+eo+IoNbM0R3XLY= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:198782 X-Mailman-Approved-At: Sat, 25 May 2013 15:21:00 -0400 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:91048 Archived-At: Hi Pascal, "Pascal J. Bourguignon" wrote: > Miguel Guedes 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