From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local Date: Sun, 13 Aug 2023 08:53:28 +0300 Message-ID: <83o7jbcwtj.fsf@gnu.org> References: <953357c8-83b4-5d7f-7638-e79382ad164c@gmail.com> <87zg2yfn53.fsf@web.de> <2c06d6df-dd6d-78c4-f4dd-44cac8d95d84@gmail.com> <87h6p6dt0x.fsf@web.de> <83edk9hm2y.fsf@gnu.org> <87r0o7r2z9.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 65209@debbugs.gnu.org To: Michael Heerdegen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 13 07:54:25 2023 Return-path: 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 ) id 1qV43V-0007Z3-7D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Aug 2023 07:54:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV43A-0001SQ-Tr; Sun, 13 Aug 2023 01:54:04 -0400 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 ) id 1qV438-0001S8-Of for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 01:54:02 -0400 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 ) id 1qV438-0002sn-GF for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 01:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qV438-00067j-2s for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 01:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2023 05:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65209 X-GNU-PR-Package: emacs Original-Received: via spool by 65209-submit@debbugs.gnu.org id=B65209.169190602123510 (code B ref 65209); Sun, 13 Aug 2023 05:54:02 +0000 Original-Received: (at 65209) by debbugs.gnu.org; 13 Aug 2023 05:53:41 +0000 Original-Received: from localhost ([127.0.0.1]:57958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV42n-000677-7c for submit@debbugs.gnu.org; Sun, 13 Aug 2023 01:53:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV42j-00066r-6J for 65209@debbugs.gnu.org; Sun, 13 Aug 2023 01:53:39 -0400 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 ) id 1qV42d-0002qQ-Kl; Sun, 13 Aug 2023 01:53:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=i0wKUldYy/4VfbZ2oLomqRMjRBv3gWQkL2W5F0pMy9E=; b=ZNSvV+PPXwO8ZTibR+jy Hw1s4hN/CnbFK9bm+jkLyOy65ho+ipJFdmqzZ+qGjDXf06AO/NSTH3tNMW2jBIx1P3rThMPSjyxWW VyLQ/ZC2s0V5qPa0rAwDQCvKdIQ42HRsVBIuwjiq6JwK3cnyKEEHbfzWNx4aZqFp7ckRuNl3C76Kd NDvkleCUKz1KbH2+7iTiKrrBooTlYnizX46wdvYcj7W5glcrb0hOuJq8wDXIuQrv8POwdxHOsvFkV 6LfQcXaLiVe96BO0BRlr60/yR/lPEVy57mHp8HycWrr8e1rlp3B1hhVN23UpQcU/tphncOCByVX72 j6omgV3I4S9RHA==; In-Reply-To: <87r0o7r2z9.fsf@web.de> (message from Michael Heerdegen on Sun, 13 Aug 2023 06:16:42 +0200) 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:267340 Archived-At: > From: Michael Heerdegen > Cc: Gerd Möllmann , > 65209@debbugs.gnu.org > Date: Sun, 13 Aug 2023 06:16:42 +0200 > > Eli Zaretskii writes: > > > > > `setq' sets the buffer local binding, not the global value the `let' > > > > binding refers to. > > > I guess this bug can be closed, then? Or is there anything left to > > do? > > After thinking more about it: > > I could explain the behavior of Gerd's recipes using the manual, but it > doesn't explain the state in my above example _after_ the `let' has > been left. > > The manual has a *Warning* section about mixing `let', buffer-local > variables, and changing the current buffer. But it doesn't explain what > happens in a single buffer when you `let'-bind a (declared) variable, > make it local inside the `let', and finish the `let'. Is the variable > still buffer-local afterwards, or does `let' remove the > buffer-localness? With other words, is leaving a `let' the same as a > `setq' to the remembered value, or is it more? > > Do we answer that question somewhere? If not, I suggest to add that, > maybe as an example before the *Warning* section. I added Stefan to this discussion near its beginning, but you've removed his address from the CC list. I've now re-added him back in the hope that he can shed some light on the convoluted case you describe.