From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 67196@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#67196: M-: uses a wrong value of debug-on-error when it is nil.
Date: Fri, 24 Nov 2023 17:10:47 +0000 [thread overview]
Message-ID: <ZWDZF17mTpJp48ly@ACM> (raw)
In-Reply-To: <jwvjzqdekij.fsf-monnier+emacs@gnu.org>
Hello, Stefan.
On Sun, Nov 19, 2023 at 12:19:49 -0500, Stefan Monnier wrote:
> > Thinking about it more clearly, we're using one variable, debug-on-error,
> > for two conflicting purposes:
> > (i) The calling mechanism of execute-extended-command, including the
> > invocation of the debugger, should an error be signalled.
> > (ii) Use in the form to be evaluated, where the variable's value outside
> > of execute-extended-command should endure.
> Yes, there's a conflicting need here: we want to control the way `eval`
> works "from the outside", i.e. we want the `debug-on-error` to apply to
> the evaluator but not to the code being evaluated.
> But `eval` doesn't distinguish between the context of the evaluator and
> the context of the code being evaluated because all ELisp code uses the
> same evaluator. I can't think of any way to split the variable into two
> to solve the problem. Instead it gives me the impression we're trying
> some impossible feat like watching oneself sleep.
I can think of a way to do this (indeed, I've got a trial implementation
here which works).
Firstly, though, there is a bug in the doc string of
eval-expression-debug-on-error: rather than stating what the meaning of
the variable is, what it's for, it states the low level details of how
it achieves the desired effect. This is needlessly restrictive. I
propose changing that doc string from:
If non-nil set `debug-on-error' to t in `eval-expression'.
If nil, don't change the value of `debug-on-error'.
to something like:
Non-nil means enter debugger on an error in a call from `eval-expression'.
Does not apply to errors handled by `condition-case' or those
matched by `debug-ignored-errors'.
A nil value for this variable will not prevent an entry to
the debugger caused by other variables such as `debug-on-error'.
Like `debug-on-error', this variable's value can also be a list,
with the same meaning as for `debug-on-error'.
.. With this change, the mechanism for eval-expression-debug-on-error
can be changed such that it doesn't become confused with debug-on-error.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2023-11-24 17:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 13:48 bug#67196: M-: uses a wrong value of debug-on-error when it is nil Alan Mackenzie
2023-11-15 17:19 ` Eli Zaretskii
2023-11-15 17:55 ` Alan Mackenzie
2023-11-19 17:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-19 17:33 ` Eli Zaretskii
[not found] ` <87a5r9efj0.fsf@dick>
2023-11-19 19:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-24 17:10 ` Alan Mackenzie [this message]
2023-11-24 18:48 ` Eli Zaretskii
2023-11-24 20:54 ` Alan Mackenzie
2023-11-24 21:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-24 22:21 ` Alan Mackenzie
2023-11-25 7:59 ` Eli Zaretskii
2023-11-25 10:32 ` Alan Mackenzie
2023-11-25 11:15 ` Eli Zaretskii
2023-11-25 12:40 ` Alan Mackenzie
2023-11-25 13:04 ` Eli Zaretskii
2023-11-25 14:14 ` Alan Mackenzie
2023-11-25 15:50 ` Eli Zaretskii
2023-11-25 16:40 ` Alan Mackenzie
2023-11-25 16:46 ` Eli Zaretskii
2023-11-25 16:57 ` Alan Mackenzie
2023-11-25 17:36 ` Alan Mackenzie
2023-11-25 18:12 ` Andreas Schwab
2023-11-25 14:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-17 4:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-19 3:54 ` Richard Stallman
2023-12-19 5:05 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-25 3:41 ` Richard Stallman
2023-12-26 2:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-27 4:54 ` Richard Stallman
2023-11-25 7:30 ` Eli Zaretskii
2023-11-24 20:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-24 21:33 ` Alan Mackenzie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWDZF17mTpJp48ly@ACM \
--to=acm@muc.de \
--cc=67196@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.