all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Debugging Elisp
Date: Sat, 25 May 2013 15:44:35 +0200	[thread overview]
Message-ID: <87wqqnjhrw.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: 51a08001$0$32589$862e30e2@ngroups.net

Miguel Guedes <miguel.a.guedes@gmail.com> writes:

> Hello List,
>
> 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.

When you enter the debugger, you can then go over some link and type RET
to jump to the source of the faulty expression.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You can take the lisper out of the lisp job, but you can't take the lisp out
of the lisper (; -- antifuchs


  reply	other threads:[~2013-05-25 13:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25  9:10 Debugging Elisp Miguel Guedes
2013-05-25 13:44 ` Pascal J. Bourguignon [this message]
2013-05-25 19:00   ` Sebastien Vauban
2013-05-26  0:43     ` Stefan Monnier
     [not found]     ` <mailman.390.1369529042.22516.help-gnu-emacs@gnu.org>
2013-05-26 19:12       ` Sebastien Vauban
2013-05-26  9:49 ` Phillip Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqqnjhrw.fsf@kuiper.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.