I feel a little weird just enabling this, let's see what I think about auto-killing any buffer older than six hours. It won't run often, if I want it to run hourly, I could put it in to a repeating timer, myself.
provide 'cce/midnight-mode)
(setq clean-buffer-list-delay-general 0.5)
(1)
(midnight-mode setq clean-buffer-list-kill-never-buffer-names
(append clean-buffer-list-kill-never-buffer-names
(list "*Group*"))) (
I really wish this clean-buffers
functionality could exclude based on mode, what an oversight! We can
cheese it, however, with this function which can be added to help:clean-buffer-list-kill-never-regexps.
defun cce/check-kill-exwm-mode (buffer-name)
("Checks whether the buffer backing [`buffer-name'] is an EXWM-mode buffer to exclude from midnight-mode.
To enable this, add it to [`clean-buffer-list-kill-never-regexps'], which will get it funcall'd in the midnight-mode hook."
(with-current-buffer buffer-nameeq major-mode 'exwm-mode)))
(
'clean-buffer-list-kill-never-regexps #'cce/check-kill-exwm-mode) (add-to-list