GNU bug report logs - #67196
M-: uses a wrong value of debug-on-error when it is nil.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Wed, 15 Nov 2023 17:03:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


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

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67196 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#67196: M-: uses a wrong value of debug-on-error when it is
 nil.
Date: Wed, 15 Nov 2023 17:55:18 +0000
Hello, Eli.

On Wed, Nov 15, 2023 at 19:19:17 +0200, Eli Zaretskii wrote:
> > Date: Wed, 15 Nov 2023 13:48:40 +0000
> > From: Alan Mackenzie <acm <at> muc.de>

> > Hello, Emacs.

> > On the master branch (and probably any recent Emacs):

> > (i) emacs -Q
> > (ii) C-h v debug-on-error RET
> > (iii) M-: debug-on-error RET

> > >From (ii) it will be seen that debug-on-error's value is nil.
> > (iii) wrongly reports that its value is t.  This is a bug.

> > #########################################################################

> > What is happening here is that eval-expression binds debug-on-error to
> > an uninterned symbol called "t", so that d-o-e will be set to non-nil
> > for the evaluation of the coming form.

> > This has the unwanted side effect of ignoring the actual value of d-o-e
> > in forms which use it.  For example, if the variable is set to a list of
> > error symbols, this value gets ignored on evaluating a form with M-:.

> Aren't we doing this on purpose, Stefan?

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.

It would seem to me we really need two distinct variables for these two
purposes.  I think it's clear that purpose (ii) would be the one to
retain use of debug-on-error.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 262 days ago.

Previous Next


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