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: Sun, 17 Dec 2023 10:24:49 -0500 Message-ID: References: <878r919qfh.fsf@localhost> <87il52w744.fsf@localhost> <83fs06rz10.fsf@gnu.org> <87fs06w4ui.fsf@localhost> <83bkaurut9.fsf@gnu.org> <87o7esq319.fsf@localhost> <83bkasrb3f.fsf@gnu.org> <83wmtgpuyf.fsf@gnu.org> <871qboprh3.fsf@localhost> <87y1dwobey.fsf@localhost> <878r5v20gu.fsf@localhost> <83bkapl5zh.fsf@gnu.org> <83zfy9jkoh.fsf@gnu.org> <878r5tglwp.fsf@localhost> <83ttohjet0.fsf@gnu.org> <8734w114pa.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="37970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 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 Sun Dec 17 16:25: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 1rEt1A-0009fC-JE for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Dec 2023 16:25:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEt0q-0005NY-4N; Sun, 17 Dec 2023 10:25:04 -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 1rEt0o-0005NL-Bm for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 10:25:02 -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 1rEt0n-0000oE-7R for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 10:25:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEt0o-0008J7-54 for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 10:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Dec 2023 15:25: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.170282670131921 (code B ref 66117); Sun, 17 Dec 2023 15:25:02 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 17 Dec 2023 15:25:01 +0000 Original-Received: from localhost ([127.0.0.1]:58882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEt0m-0008In-Ih for submit@debbugs.gnu.org; Sun, 17 Dec 2023 10:25:00 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEt0l-0008IY-6D for 66117@debbugs.gnu.org; Sun, 17 Dec 2023 10:24:59 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8C4B310009E; Sun, 17 Dec 2023 10:24:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1702826691; bh=zvuui0HiazvCW0b42ssM5KEKxPC73SzUGrHttOGqIfo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=B84nXjt5JUTTMTkqVh3Q0LDmBR1EnTD3Hwo9NeMJNHAqSA/9McGmgqkLqvHqSv9Xi DR1+a0C1aGwwKaLJhGaxTtVcHCbu/9tDxb+HF55qfBAEvFL183E/w/MLdB0O7HSObt piPSMbIV9ovPfakY3UUgdjISNH7pcWVgtSILkFhlxifmCLnmv1PsfnmrxJ6WgfPGDu 7zDkUzwXR6bSPpHT4Rq5h4AKUEhJKb1SBknnav7Dm1Jov9YATcI5861hWZWa20fO/u WAf28DZFZYJRm6HPJhuOJ9VC5HReISmKYWu88AvTOYQgNU4EdWjlz2GNpTGZ1U2iHU yjSxnmrPnBX9Q== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 708EF10001D; Sun, 17 Dec 2023 10:24:51 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3ED94120FF3; Sun, 17 Dec 2023 10:24:51 -0500 (EST) In-Reply-To: <8734w114pa.fsf@localhost> (Ihor Radchenko's message of "Sun, 17 Dec 2023 10:52:33 +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:276428 Archived-At: >> Maybe I'm confused, but won't this change have at least _some_ effect >> on Lisp programs? For example, what about this fragment from the >> 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 variable does not have a =E2= =80=98let=E2=80=99-style binding >> that was made in the current buffer, does so. >> >> Will this case work the same after the change as it did before? > > I read this differently - when you have > > (let ((var 'val)) > (make-variable-buffer-local 'var)) > > it will not set buffer-local value to 'val. So, what the paragraph above says is that (setq var val) will make `var` buffer-local, but (let ((var val)) ...) will not and neither will (let ((var val)) ... (setq var val2) ...) IOW, `setq` makes the var buffer-local only when the assignment affects the global binding. The same holds for DEFVAR_PER_BUFFER variables like `case-fold-search`: (with-temp-buffer (let ((case-fold-search nil)) (list (local-variable-p 'case-fold-search) (setq case-fold-search t) (local-variable-p 'case-fold-search)))) =3D=3D> (nil t nil) -- Stefan