From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Mon, 01 Jan 2024 20:30:48 -0500 Message-ID: References: <878r919qfh.fsf@localhost> <871qboprh3.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> Reply-To: Stefan Monnier 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="2358"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , dmitry@gutov.dev, Eli Zaretskii , mattias.engdegard@gmail.com, 66117@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 02 02:31:30 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 1rKTcv-0000S6-QH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jan 2024 02:31:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKTcY-0004wQ-TZ; Mon, 01 Jan 2024 20:31: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 1rKTcT-0004vv-1J for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 20:31:01 -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 1rKTcS-0004Xr-06 for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 20:31:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKTcT-0004Ro-Ot for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 20:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jan 2024 01:31:01 +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.170415906016912 (code B ref 66117); Tue, 02 Jan 2024 01:31:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 2 Jan 2024 01:31:00 +0000 Original-Received: from localhost ([127.0.0.1]:49041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKTcR-0004OL-Gt for submit@debbugs.gnu.org; Mon, 01 Jan 2024 20:30:59 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKTcQ-0004Df-Ku for 66117@debbugs.gnu.org; Mon, 01 Jan 2024 20:30:59 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0037F44177E; Mon, 1 Jan 2024 20:30:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1704159049; bh=QXEGk3XsSkkwcm76GopUwLhy06FPH4fyW8nuMS1RPNs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Xl0nHUm1WiAimaP7WDRU+Oz0s0vkyJRscqge28wdh9+7aX68ffp7eTA2xUtIKFTOD O/WuRE0k4Vzf4+oEXh0e3ViyN3O0Tj+5Na1/J/yEq1m+MvX4YyKfc3kh1yE7dRB+mK ZWoTc4uyQ5gPWjMNRc8SB+kXOahTiWlq3BLKDPg0FsrEvfAdA4B0SotvG/a5pgcaR3 82DOca5h9COZ3nEB17G72VRsUr/pxdzPNYmmCYOLuEsGIMEVMLgQBn3dsBb1TivIkh WK2awzDP9mdxPl3Lx45l1UxhbUth5LHBpqwm67XjcuWt67ZOaMn+yVymzldYG98vhO dOjX0LXbKMgOQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A29BC4416BD; Mon, 1 Jan 2024 20:30:49 -0500 (EST) Original-Received: from alfajor (unknown [207.96.224.130]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 776F81211B6; Mon, 1 Jan 2024 20:30:49 -0500 (EST) In-Reply-To: <878r5953ux.fsf@localhost> (Ihor Radchenko's message of "Mon, 01 Jan 2024 18:02:30 +0000") 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:277203 Archived-At: Ihor Radchenko [2024-01-01 18:02:30] wrote: > Gerd M=C3=B6llmann 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))) >> >> C-h f default-value explains this: >> >> Return SYMBOL=E2=80=99s default value. >> This is the value that is seen in buffers that do not have their own v= alues >> for this variable. > > 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 c= reate 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 variabl= e 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". ] Stefan