From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#69056: 30.0.50; history-add-new-input and recursive minibuffers
Date: Thu, 15 Feb 2024 21:34:09 +0200
Message-ID: <86zfw1v7wu.fsf@gnu.org>
References: <m11q9jngho.fsf@dazzs-mbp.home>
 <jwvplwxah1w.fsf-monnier+emacs@gnu.org>
 <m1v86pln1l.fsf@dazzs-mbp.home>
 <jwvwmr58vth.fsf-monnier+emacs@gnu.org>
 <m17cj5woyq.fsf@dazzs-mbp.home> <jwv8r3l8rkx.fsf-monnier+emacs@gnu.org>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="24737"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 69056@debbugs.gnu.org, me@eshelyaron.com
To: Stefan Monnier <monnier@iro.umontreal.ca>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 20:34:52 2024
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 1rahVU-0006EQ-09
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 20:34:52 +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 1rahVN-0000x5-2g; Thu, 15 Feb 2024 14:34:45 -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 1rahVL-0000t8-Tm
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 14:34:43 -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 1rahVL-000605-Lg
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 14:34:43 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rahVe-0005NN-Eb
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 14:35:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 15 Feb 2024 19:35:02 +0000
Resent-Message-ID: <handler.69056.B69056.170802568320632@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 69056
X-GNU-PR-Package: emacs
Original-Received: via spool by 69056-submit@debbugs.gnu.org id=B69056.170802568320632
 (code B ref 69056); Thu, 15 Feb 2024 19:35:02 +0000
Original-Received: (at 69056) by debbugs.gnu.org; 15 Feb 2024 19:34:43 +0000
Original-Received: from localhost ([127.0.0.1]:57108 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rahVL-0005Mh-G4
 for submit@debbugs.gnu.org; Thu, 15 Feb 2024 14:34:43 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:51582)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1rahVJ-0005MR-Qn
 for 69056@debbugs.gnu.org; Thu, 15 Feb 2024 14:34:42 -0500
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>)
 id 1rahUu-0005yG-1d; Thu, 15 Feb 2024 14:34:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=n0yeLMZxOzvbTa8aWc+xzE6Tu5GC1MqpVZ0RS4PcvAQ=; b=iGrC2j3EgFim
 csMIVqQBf5xkXWWWvanrmHZgMICDw5usNRILd+tnOW3TPpg3rYfCorgfQ1cpnDklr17GBvQnNUm9S
 f5osxSbnZxJS9Msk8rLa1uGU3isi+W0nKbzxmWTufj4DQyEQrmTUCs6okTg1MO2y8p20VjiipPzqC
 ve1dBXI+6eEv8cYOzv1HOZu5rOrdGdtF/dlvwK+LZfH5UfvNc+syAnQn4aFEhZnvQKYGuzi/uZAXR
 ggOx+7M487E75KnURRdS8+jnoKtcSlJJXtTOawWnax4CiauyFnnUFYviQw6G3RSNYQa+Yh0D+9JFK
 VLzarKwS80pCxCJQGufO9w==;
In-Reply-To: <jwv8r3l8rkx.fsf-monnier+emacs@gnu.org> (bug-gnu-emacs@gnu.org)
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:280078
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/280078>

> Cc: 69056@debbugs.gnu.org
> Date: Thu, 15 Feb 2024 14:20:08 -0500
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> >> Why not use `Vhistory_add_new_input`?
> > Good question, I guess for some reason I assumed that `NILP (Vfoo)`
> > doesn't check the buffer-local value like `find_symbol_value (Qfoo)`
> > does...
> 
> The handling of Vfoo is quite delicate, but it does give you the value
> in the current-buffer (i.e. they're changed as needed whenever we go
> through `set_buffer`).
> 
> > Oh, that's much simpler indeed.  And it seems to work just as well.
> > Here's an updated patch (v2):
> 
> LGTM.
> Eli&Stefan, any objection?

Yes, see my other message.  I feel like we are making an effort to
change the internals, which runs the usual risk of breaking things,
for very little gain.  The more general issue with let-binding
variables around APIs that enter the minibuffer stays, so I see little
sense to fix just this one problem in an incomplete way that could on
top of that break existing code.