From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Alan Mackenzie <acm@muc.de>
Newsgroups: gmane.emacs.bugs
Subject: bug#67196: M-: uses a wrong value of debug-on-error when it is nil.
Date: Sat, 25 Nov 2023 16:57:21 +0000
Message-ID: <ZWIncbvgpPxb2WPq@ACM>
References: <ZWEh52qxu8CfNKlC@ACM> <83il5qe00e.fsf@gnu.org>
 <ZWHNN3LTX-QNDd51@ACM> <83edgecce4.fsf@gnu.org>
 <ZWHrIwPr5aW0IXvr@ACM> <8334wuc7cn.fsf@gnu.org>
 <ZWIBY6B_7s8qbZzD@ACM> <83y1elbzny.fsf@gnu.org>
 <ZWIjiObn_fBCzpwO@ACM> <83sf4tbx2q.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="32942"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 67196@debbugs.gnu.org, acm@muc.de, monnier@iro.umontreal.ca
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 25 17:58:15 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1r6vyw-0008LL-DU
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Nov 2023 17:58:14 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1r6vyh-0008WT-Ny; Sat, 25 Nov 2023 11:58:00 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r6vyf-0008Vx-66
 for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 11:57:57 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r6vye-00072c-QV
 for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 11:57:56 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r6vyj-0008WG-Un
 for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 11:58:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Alan Mackenzie <acm@muc.de>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 25 Nov 2023 16:58:01 +0000
Resent-Message-ID: <handler.67196.B67196.170093145532700@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 67196
X-GNU-PR-Package: emacs
Original-Received: via spool by 67196-submit@debbugs.gnu.org id=B67196.170093145532700
 (code B ref 67196); Sat, 25 Nov 2023 16:58:01 +0000
Original-Received: (at 67196) by debbugs.gnu.org; 25 Nov 2023 16:57:35 +0000
Original-Received: from localhost ([127.0.0.1]:40131 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1r6vyJ-0008VL-Fh
 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 11:57:35 -0500
Original-Received: from mail.muc.de ([193.149.48.3]:56655)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@muc.de>) id 1r6vyH-0008V7-AF
 for 67196@debbugs.gnu.org; Sat, 25 Nov 2023 11:57:34 -0500
Original-Received: (qmail 60121 invoked by uid 3782); 25 Nov 2023 17:57:21 +0100
Original-Received: from acm.muc.de (pd953a2e3.dip0.t-ipconnect.de [217.83.162.227])
 (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 25 Nov 2023 17:57:21 +0100
Original-Received: (qmail 19638 invoked by uid 1000); 25 Nov 2023 16:57:21 -0000
Content-Disposition: inline
In-Reply-To: <83sf4tbx2q.fsf@gnu.org>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
X-Primary-Address: acm@muc.de
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:275002
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/275002>

Hello, Eli.

On Sat, Nov 25, 2023 at 18:46:05 +0200, Eli Zaretskii wrote:
> > Date: Sat, 25 Nov 2023 16:40:40 +0000
> > Cc: monnier@iro.umontreal.ca, 67196@debbugs.gnu.org, acm@muc.de
> > From: Alan Mackenzie <acm@muc.de>

> > > > Instead, the new internal variable
> > > > debug-from--eval-expression gets set to e-e-debug-on-error.

> > > Exactly.  And that value can be non-nil, but also not t.  That is the
> > > change I see, and your doc string suggests that it is intentional.
> > > Thus, we have a behavior change wrt to the value that the body of
> > > eval-expression will see.  And non-nil, non-t values have special
> > > meaning there.

> > OK, I'm with you, now.  The non-nil, non-t value in the internal variable
> > debug-from--e-e won't be seen by any Lisp code.  It can be seen by Lisp
> > code in eval-expression-debug-on-error.

> > This is an extension of e-e-debug-on-error to match what debug-on-error
> > does.  I wouldn't think that d-o-e gets set to a list of conditions very
> > often, but when it does, it's likely very useful.  It seemed logical to
> > extend the same facility to e-e-debug-on-error.  Do you think this is a
> > bad idea?  [Clearly, some entries in NEWS will be needed, as well as
> > amendments to the Elisp manual.]

> I don't know yet if it is a good idea, I just wanted to point out that
> your change is not just a bugfix: it actually changes the behavior of
> eval-expression.

OK.  It's a change that would be trivially easy to reverse.

My guess is that debug-on-error was originally a DEFVAR_BOOL, and at some
stage it was extended to handle a list of conditions.  But for some
reason eval-expression-debug-on-error was not extended in the same way.
Perhaps this was an oversight.  If so, now would be a good time to fix
this.

Maybe there is some evidence of what happened in the repository.  I'll
have a look.

-- 
Alan Mackenzie (Nuremberg, Germany).