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

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

bug#54100: 29.0.50; Allow project-buffers to ignore some buffers


From: Manuel Uberti
Subject: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 10:55:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 23/02/22 10:48, Manuel Uberti wrote:
I attached a patch. Let me know if I missed something or am approach the matter in a wrong way.

To try my code I used the following predicate (mu-ignored-buffers is in the first message of this ticket):

(defun mu-buffer-predicate (buffer)
   "Check if BUFFER is NOT a member of `mu-ignored-buffers'."
   (not (seq-contains-p mu-ignored-buffers
                        (buffer-name (cdr buffer))
                        #'string-match-p)))

And this setting:

(setq-default project-switch-to-buffer-conditions '(mu-buffer-predicate))

Note that I didn't bump the package-version on `project-switch-to-buffer-conditions' because I don't know if it is required.

It also works with `mu-buffer-predicate' using this instead:

(not (seq-contains-p mu-ignored-buffers (car buffer) #'string-match-p))

--
Manuel Uberti
www.manueluberti.eu





reply via email to

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