unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores
@ 2020-07-16  8:15 Philip K.
       [not found] ` <handler.42386.B.159488736413990.ack@debbugs.gnu.org>
  2020-07-16 13:43 ` bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores Dmitry Gutov
  0 siblings, 2 replies; 35+ messages in thread
From: Philip K. @ 2020-07-16  8:15 UTC (permalink / raw)
  To: 42386


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.





^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2020-07-28 22:33 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  8:15 bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores Philip K.
     [not found] ` <handler.42386.B.159488736413990.ack@debbugs.gnu.org>
2020-07-16  8:47   ` bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores) Philip K.
2020-07-16 15:14     ` Eli Zaretskii
2020-07-16 18:08       ` Philip K.
2020-07-16 18:16       ` Philip K.
2020-07-16 19:35         ` Eli Zaretskii
2020-07-16 22:22           ` Philip K.
2020-07-17  6:38             ` Eli Zaretskii
2020-07-17  8:16               ` Philip K.
2020-07-17 10:49                 ` Eli Zaretskii
2020-07-17 11:17                   ` Philip K.
2020-07-17 11:26                     ` Eli Zaretskii
2020-07-17 15:30                       ` Philip K.
2020-07-17 15:43                         ` Dmitry Gutov
2020-07-17 17:16                           ` Philip K.
2020-07-17 22:21                             ` Dmitry Gutov
2020-07-18 12:48                               ` Philip K.
2020-07-19 23:10                                 ` Dmitry Gutov
2020-07-20 12:07                                   ` Philip K.
2020-07-20 13:39                                     ` Dmitry Gutov
2020-07-21  9:11                                       ` Philip K.
2020-07-21 14:27                                         ` Eli Zaretskii
2020-07-21 18:35                                           ` Philip K.
2020-07-21 18:57                                             ` Eli Zaretskii
2020-07-21 20:47                                               ` Dmitry Gutov
2020-07-21 18:45                                         ` Dmitry Gutov
2020-07-21 18:51                                           ` Philip K.
2020-07-27 16:26                                             ` Dmitry Gutov
2020-07-27 18:33                                               ` Philip K.
2020-07-28 22:33                                                 ` Dmitry Gutov
2020-07-16 18:41       ` Dmitry Gutov
2020-07-16 22:46         ` Juri Linkov
2020-07-17  0:23           ` Dmitry Gutov
2020-07-16 13:43 ` bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores Dmitry Gutov
2020-07-16 18:00   ` Philip K.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).