From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Tue, 02 Jan 2024 11:00:06 +0000 Message-ID: <87ttnw3sqx.fsf@localhost> References: <878r919qfh.fsf@localhost> <87y1dwobey.fsf@localhost> <878r5v20gu.fsf@localhost> <83bkapl5zh.fsf@gnu.org> <83zfy9jkoh.fsf@gnu.org> <878r5tglwp.fsf@localhost> <83ttohjet0.fsf@gnu.org> <83sf41jed7.fsf@gnu.org> <87y1dtyu4y.fsf@localhost> <83plz5jdgj.fsf@gnu.org> <87v88xyt2a.fsf@localhost> <83o7epjaon.fsf@gnu.org> <87edfipbpf.fsf@localhost> <877cl7n0ux.fsf@localhost> <878r5953ux.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1603"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , dmitry@gutov.dev, Eli Zaretskii , mattias.engdegard@gmail.com, 66117@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 02 11:58:19 2024 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 1rKcTT-0000CA-KL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jan 2024 11:58:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKcTG-00020I-Kt; Tue, 02 Jan 2024 05:58:06 -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 ) id 1rKcTA-0001zD-W0 for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 05:58:03 -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 ) id 1rKcTA-0006Jy-0K for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 05:58:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKcTC-0006CV-2G for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 05:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jan 2024 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66117 X-GNU-PR-Package: emacs Original-Received: via spool by 66117-submit@debbugs.gnu.org id=B66117.170419303023771 (code B ref 66117); Tue, 02 Jan 2024 10:58:02 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 2 Jan 2024 10:57:10 +0000 Original-Received: from localhost ([127.0.0.1]:49485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKcSL-0006BK-U4 for submit@debbugs.gnu.org; Tue, 02 Jan 2024 05:57:10 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:34917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKcSG-0006Ak-77 for 66117@debbugs.gnu.org; Tue, 02 Jan 2024 05:57:07 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3C943240028 for <66117@debbugs.gnu.org>; Tue, 2 Jan 2024 11:56:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704193016; bh=rn1hMGRnmvmjreo5n+7Xf4ou47oCneVOnDp+JYUwd50=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=Pm/UWo2A63saHapfN7KRWmtD7V3SZ2H0S6iHoH7dziaWB9SLaIN6uyMHcfmnmPVPi VDfyYbwgEpdx95zi8b2ZpasKlbSifcD0+B74QcaxL+0dCgtXobQ1ZUGSP98Tzv2IjH s0STODf/cphtKI03Swn7CsHk8BoigcpBQfv1us2rzoLBH9qrnJLkrJr3g5ld08vBDP oiKxiU7heZuwvzypFsi7PeYL6eGyIaOaQ7Ogell4l2UR3FUVDCvzToTy43WqWdQfx3 FXp3EwJ83MTTDKYtIKmWl/eTiFv9O2lG8w4El3ifpE0mNW9kzvEewX8R6NTFR9pFmr 3L7qyXkrz6NBQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T48tb1nw3z6twq; Tue, 2 Jan 2024 11:56:55 +0100 (CET) In-Reply-To: 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:277223 Archived-At: Stefan Monnier writes: >>>> (defvar-local let-tests-buffer-local-var 'value) >>>> (with-temp-buffer >>>> (setq-local let-tests-buffer-local-var 'baz) >>>> (let ((let-tests-buffer-local-var 'bar)) >>>> ;; This is failing. >>>> (should (eq 'bar (default-value 'let-tests-buffer-local-var))) >> ... >> Are you saying that `let' never changes `default-value' output? >> Unfortunately, no. > > Indeed, see the doc that Eli quoted 10 posts "ago": > > [...] ELisp manual, which describes the effect of > make-variable-buffer-local: > > A peculiar wrinkle of this feature is that binding the variable > (with =E2=80=98let=E2=80=99 or other binding constructs) does not= create > a buffer-local binding for it. Only setting the variable (with > =E2=80=98set=E2=80=99 or =E2=80=98setq=E2=80=99), while the varia= ble does not have a =E2=80=98let=E2=80=99-style > binding that was made in the current buffer, does so. > > IOW, `let` changes the binding that is "current": if the variable is > buffer-local in the current buffer it changes that buffer-local value > and otherwise it changes the global value. > [ This for "automatically buffer-local variables". ] What you say is indeed what I observe, but I do not see how it follows from the quoted manual text. When I read the above part of the manual, I see a warning about using `set'/`setq' inside `let' that binds the same variable. I think that the caveat about binding buffer-local variables should be documented. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at