GNU bug report logs - #36145
26.2; Unable to "trigger another backtrace"

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Sun, 9 Jun 2019 07:19:02 UTC

Severity: minor

Found in version 26.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 36145 <at> debbugs.gnu.org
Subject: bug#36145: 26.2; Unable to "trigger another backtrace"
Date: Sun, 09 Jun 2019 08:19:39 -0400
Xu Chunyang <mail <at> xuchunyang.me> writes:

> (info "(elisp) Using Debugger") says
>
>> When the debugger has been entered, the ‘debug-on-error’ variable is
>> temporarily set according to ‘eval-expression-debug-on-error’.  If the
>> latter variable is non-‘nil’, ‘debug-on-error’ will temporarily be set
>> to ‘t’.  This means that any further errors that occur while doing a
>> debugging session will (by default) trigger another backtrace.
>
> Text before "This means.." is correct, but the conclusion seems
> incorrect, to reproduce
>
> - emacs -Q
> - M-: (/ 1 0)     ;; enter the debugger
> - M-: (/ 2 0)     ;; just message the error, no another backtrace
>
> Am I misunderstanding "trigger another backtrace"?

I think this is a documentation bug.  You don't get another backtrace
because inhibit-debugger is bound to t before invoking the debugger.
This has been the case since Emacs 24.3 when inhibit-debugger was
introduced [1: 45b82ad0eb].

But even before that, debug-on-error was in fact bound to nil when
entering the debugger (and that has been the case since the initial
revision of debug.el), so the documentation was always wrong (although
it looks like you could trigger another backtrace with M-: because
eval-expression would rebind debug-on-error according to
eval-expression-debug-on-error, so the conclusion used to be correct,
even though the explanation was always wrong).

[1: 45b82ad0eb]: 2012-09-11 20:14:50 -0400
  * src/eval.c: Add `inhibit-debugger'.
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=45b82ad0ebedaa1b7094912e218bea1510c33feb




This bug report was last modified 3 years and 78 days ago.

Previous Next


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