GNU bug report logs - #24616
26.0.50; No backtrace when emacsclient --eval fails

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Tue, 4 Oct 2016 16:31:01 UTC

Severity: wishlist

Found in version 26.0.50

Full log


Message #26 received at 24616 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24616 <at> debbugs.gnu.org, clement.pit <at> gmail.com
Subject: Re: bug#24616: 26.0.50; No backtrace when emacsclient --eval fails
Date: Sat, 22 Oct 2016 11:35:49 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:
>> >> Just a note: you can get a backtrace by setting debug-on-signal
>> >> instead of debug-on-error.
>> >
>> > Really?
>> >
>> > $ emacsclient --eval '(progn (defun f () (error "foo")) (setq debug-on-signal t debug-on-error t) (f))'
>> > *ERROR*: foo
>> >
>> > Am I missing something obvious?
>> 
>> The backtrace shows up in Emacs, where the server is running.
>
> How about adding this to debugging.texi?

Something like this?

diff --git i/doc/lispref/debugging.texi w/doc/lispref/debugging.texi
index c88a2fa..bb3ced4 100644
--- i/doc/lispref/debugging.texi
+++ w/doc/lispref/debugging.texi
@@ -152,6 +152,11 @@ Error Debugging
 must still fulfill the criteria specified by @code{debug-on-error} and
 @code{debug-ignored-errors}.)
 
+For example, setting this variable is useful to get a backtrace from
+code evaluated by emacsclient.  If elisp code evaluated by emacsclient
+signals an error while this variable is non-@code{nil}, the backtrace
+will popup in the running Emacs.
+
 @strong{Warning:} Setting this variable to non-@code{nil} may have
 annoying effects.  Various parts of Emacs catch errors in the normal
 course of affairs, and you may not even realize that errors happen




This bug report was last modified 5 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.