[Top][All Lists]

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

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

From: Johan Bockgård
Subject: Re: How do I debug errors in post-command-hook?
Date: Fri, 30 Jul 2010 02:11:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> 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 spent a few hours hacking together a solution using
;; signal-hook-function and had written a reply, and just before sending
;; the message I noticed that this actually works:
(defadvice lusty--post-command-function (around intercept activate)
  (condition-case err
    ;; Let the debugger run
    ((debug error) (signal (car err) (cdr err)))))

reply via email to

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