GNU bug report logs - #59153
List project buffers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 9 Nov 2022 17:44:01 UTC

Severity: wishlist

Tags: patch

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Akib Azmain Turja <akib <at> disroot.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 59153 <at> debbugs.gnu.org
Subject: bug#59153: List project buffers
Date: Thu, 10 Nov 2022 14:56:53 +0600
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> 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 <at> hostux.social, Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 242 days ago.

Previous Next


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