Subject: bug#59153: List project buffers

From: Juri Linkov <[email-masked]>
Date: Thu, 10 Nov 2022 09:56:01 +0200

>> +         (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.