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

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

bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores


From: Philip K.
Subject: bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores
Date: Thu, 16 Jul 2020 10:15:51 +0200

Hi,

using project-kill-buffers for the last few weeks I noticed that my ERC
buffers get killed when I started my session in a project. This kicks me
out of all the channels I have joined, which is not intended.

Fixing this is easy, I just have to ignore ERC buffers:

        (add-to-list 'project-kill-buffers-ignores
                     (lambda (buf)
                       (with-current-buffer buf
                         (derived-mode-p 'erc-mode))))

but because I think that this is a common use-case, I implemented a
patch to automatically exclude certain major modes from being treated as
project dependent. The above example could then be simplified to

        (add-to-list 'project-kill-buffers-ignores
                     'erc-mode)

Currently it only checks major modes, but I guess it could be easily
extended to also handle minor modes/any buffer local variables.

-- 
        Philip K.





reply via email to

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