bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59153: List project buffers


From: Akib Azmain Turja
Subject: bug#59153: List project buffers
Date: Thu, 10 Nov 2022 14:56:53 +0600

Juri Linkov <juri@linkov.net> writes:

>>> +         (bufs (mapcan
>>> +                (lambda (buf)
>>> +                  (when (and (project--buffer-check buf '("\\`[^ ]"))
>>> +                             (or (not arg)
>>> +                                 (project--buffer-check buf 
>>> '(buffer-file-name))))
>>> +                    (list buf)))
>>> +                (project-buffers pr))))
>>> +    (display-buffer (list-buffers-noselect arg bufs))))
>>
>> This won't survive a revert buffer, I think.  (I'll show all buffers
>> then.)
>
> This means that all uses of the BUFFER-LIST arg of 'list-buffers-noselect'
> are flawed.  So better would be to provide not a list of buffers, but
> a predicate to filter out a list of buffers.  Then the revert could use
> such a predicate from e.g. a buffer-local variable.

I just modify the tabulated-list-revert-hook buffer-locally.

-- 
Akib Azmain Turja --- https://akib.codeberg.page/
GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social, Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]