GNU bug report logs - #66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 20 Sep 2023 08:53:02 UTC

Severity: minor

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>, dmitry <at> gutov.dev, Eli Zaretskii <eliz <at> gnu.org>, mattias.engdegard <at> gmail.com, 66117 <at> debbugs.gnu.org
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Tue, 02 Jan 2024 21:13:23 -0500
>> 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 ‘let’ or other binding constructs) does not create
>>         a buffer-local binding for it.  Only setting the variable (with
>>         ‘set’ or ‘setq’), while the variable does not have a ‘let’-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.

It follows from the first sentence:

    A peculiar wrinkle of this feature is that binding the variable
    (with ‘let’ or other binding constructs) does not create
    a buffer-local binding for it.

> When I read the above part of the manual, I see a warning about using
> `set'/`setq' inside `let' that binds the same variable.

That's in the second sentence.

> I think that the caveat about binding buffer-local variables should be
> documented.

Actually, let-binding works the same for all vars: it affects only the
binding that's currently active.


        Stefan





This bug report was last modified 1 year and 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.