emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I debug errors in post-command-hook?


From: Lennart Borgman
Subject: Re: How do I debug errors in post-command-hook?
Date: Thu, 29 Jul 2010 23:33:24 +0200

On Thu, Jul 29, 2010 at 10:30 PM, Tassilo Horn <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]