unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Xu Chunyang <mail@xuchunyang.me>
Cc: 36145@debbugs.gnu.org
Subject: bug#36145: 26.2; Unable to "trigger another backtrace"
Date: Sun, 09 Jun 2019 08:19:39 -0400	[thread overview]
Message-ID: <87o9370x44.fsf@gmail.com> (raw)
In-Reply-To: <m21s03z0oi.fsf@xuchunyang.me> (Xu Chunyang's message of "Sun, 09 Jun 2019 15:18:37 +0800")

Xu Chunyang <mail@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





  reply	other threads:[~2019-06-09 12:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09  7:18 bug#36145: 26.2; Unable to "trigger another backtrace" Xu Chunyang
2019-06-09 12:19 ` Noam Postavsky [this message]
2019-06-09 15:50   ` Noam Postavsky
2019-06-21 12:21     ` Noam Postavsky
2019-06-21 12:50       ` Noam Postavsky
2021-09-22 21:19         ` Lars Ingebrigtsen
2022-05-01 11:41           ` Lars Ingebrigtsen
2022-05-01 11:07 ` Lars Ingebrigtsen

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=87o9370x44.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=36145@debbugs.gnu.org \
    --cc=mail@xuchunyang.me \
    /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).