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: Mon, 01 Jan 2024 20:39:17 +0000 Message-ID: <8734vg6b62.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="34663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, Eli Zaretskii , mattias.engdegard@gmail.com, Stefan Monnier , 66117@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 01 21:37:29 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 1rKP2P-0008qY-Cw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jan 2024 21:37:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKP1z-0004Vi-6t; Mon, 01 Jan 2024 15:37:03 -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 1rKP1x-0004VY-EB for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 15:37: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 1rKP1w-0004DL-9b for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 15:37:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKP1x-00047B-ST for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 15:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jan 2024 20:37: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.170414138215762 (code B ref 66117); Mon, 01 Jan 2024 20:37:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 1 Jan 2024 20:36:22 +0000 Original-Received: from localhost ([127.0.0.1]:48836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKP1K-000469-Cq for submit@debbugs.gnu.org; Mon, 01 Jan 2024 15:36:22 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:41009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKP1I-00045s-H6 for 66117@debbugs.gnu.org; Mon, 01 Jan 2024 15:36:21 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id EEA91240105 for <66117@debbugs.gnu.org>; Mon, 1 Jan 2024 21:36:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704141372; bh=/FkUwjzUMKsBON1af2S5BGOHNa5E906SBNQGisAkMt0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=iTKJ4JX67zO4joImpgh5C0JfApJCegcZigcIAmmuDR1O3UeRALTiaNbUG5+hmodtZ xRtR+nchpKlXd5MchpGdlSqfvZulTvoLK85cPsJHyAFrlwEGnFshQbDGMMgCUonWGq iYLCLFBqS5Vc2m+Xeoz7GzsrIOJeF9pIJvqP2GUuQF66iGb0XINNmQqD2Z+5KNGjmj 45lNwVo9v6P181OiVQ2cvTubUzUsI3GvWjDO8RBw6qoB14k3/G/rliSRUWhP9bYdpf hgb2cB+fUma8yYKBLtimiBJPNtTAFCotp2LYQJOs+awf5CecdSv9nLZkneeFkfGAm7 iyc7SO2PZeU0w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T3nnQ1mwKz6tvk; Mon, 1 Jan 2024 21:36:10 +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:277199 Archived-At: 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 = values >>> for this variable. >> >> Are you saying that `let' never changes `default-value' output? > > Not really. I tried to explain why default-value, in this case, returns > what it returns. I am sorry, but I do not see how the docstring explains what is happening there. Because it is not clear what `let' does with the default value. >> Unfortunately, no. > > Maybe you are seeing something like bug#65209? Or the fix done by Stefan > Monnier in the course of that bug? (See the mails under the bug.) I am on the latest master. And I do not think that it is bug#65209. Let me simplify my example to avoid `setq-local' inside `let'. AFAIU, what `let' does to the default value depends on whether current buffer has its own local value of the variable or not. (defvar-local let-tests-buffer-local-var2 'value) ;; default value is 'value (with-temp-buffer (setq-local let-tests-buffer-local-var2 'baz) (let ((let-tests-buffer-local-var2 'bar)) ;; Let does not change the default value for variable. (should (eq 'value (default-value 'let-tests-buffer-local-var2))) (should (eq 'bar let-tests-buffer-local-var2)) (with-temp-buffer ;; We are in a new buffer - `let-tests-buffer-local-var2' has its glo= bal default value. (should (eq 'value (default-value 'let-tests-buffer-local-var2))) (should (eq 'value let-tests-buffer-local-var2))))) (with-temp-buffer ;; !!! After commenting out this line, the behaviour changes. ;; (setq-local let-tests-buffer-local-var2 'baz) (let ((let-tests-buffer-local-var2 'bar)) ;; Now, let DOES change the default value for variable. (should (eq 'bar (default-value 'let-tests-buffer-local-var2))) (should (eq 'bar let-tests-buffer-local-var2)) (with-temp-buffer ;; We are in a new buffer - `let-tests-buffer-local-var2' still has ;; let-bound global and local values. (should (eq 'bar (default-value 'let-tests-buffer-local-var2))) (should (eq 'bar let-tests-buffer-local-var2)))))=20=20=20=20=20=20= =20=20=20=20 --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at