unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-devel@gnu.org
Subject: Re: How do I debug errors in post-command-hook?
Date: Thu, 29 Jul 2010 23:33:24 +0200	[thread overview]
Message-ID: <AANLkTikUpzWTVAQtd15Y6nUfq+ZWEFqzEkiVE5s7wBUV@mail.gmail.com> (raw)
In-Reply-To: <201007292230.58883.tassilo@member.fsf.org>

On Thu, Jul 29, 2010 at 10:30 PM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Hi all,
>
> how do I debug errors that happen while executing a function in
> `post-command-hook'?  The usual debugging facilities like
> `toggle-debug-on-error' and `edebug-function' are not triggered in
> there...
>
> Background: There seem to be some packages that error when emacs is
> started with the --daemon option.  One example is the lusty-explorer's
> `lusty-buffer-explorer' function.  It works fine when run in a "normal"
> emacs, but I get an error in `post-command-hook' when emacs was
> initially started as daemon, and I'd like to know what's going wrong.

I usually split up functions in post-command-hook like this:

(defun post-fun ()
   (condition-case err
         (post-fun-1)
     (error (message "post-fun: %s" (error-message-string err)))))

(defun post-fun-1 ()
   ...)

When I get an error I do

   M-: (post-fun-1)



  reply	other threads:[~2010-07-29 21:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 20:30 How do I debug errors in post-command-hook? Tassilo Horn
2010-07-29 21:33 ` Lennart Borgman [this message]
2010-07-30  0:11 ` Johan Bockgård
2010-07-30  6:54   ` Tassilo Horn
2010-07-30 11:58     ` Johan Bockgård
2010-07-30 14:23       ` Buffer names are sometimes read-only objects in daemonized emacs (was: How do I debug errors in post-command-hook?) Tassilo Horn
2010-07-30 17:46         ` Buffer names are sometimes read-only objects in daemonized emacs Johan Bockgård
2010-07-30 18:41           ` Tassilo Horn
2010-07-30 19:54             ` Wojciech Meyer
2010-07-30 20:08               ` Tassilo Horn
2010-07-30 20:46                 ` Wojciech Meyer
2010-07-30 21:48                 ` Stefan Monnier
2010-07-30 22:07                   ` Lennart Borgman
2010-08-01 23:09                     ` Stefan Monnier
2010-07-30 23:35                   ` Johan Bockgård
2010-08-01 23:10                     ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=AANLkTikUpzWTVAQtd15Y6nUfq+ZWEFqzEkiVE5s7wBUV@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=tassilo@member.fsf.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).