Created
June 28, 2023 21:54
-
-
Save minorugh/a9585b439ca6156afdd832541dfd0bfa to your computer and use it in GitHub Desktop.
tempbuf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(leaf tempbuf | |
:doc "Auto kill unused buffers in the background" | |
:el-get (tempbuf :url "http://www.emacswiki.org/emacs/download/tempbuf.el") | |
:hook ((find-file-hook . my:find-file-tempbuf-hook) | |
((dired-mode-hook magit-mode-hook) . turn-on-tempbuf-mode)) | |
:custom | |
`((tempbuf-kill-message . nil) | |
(my:tempbuf-ignore-files . '("~/Dropbox/org/task.org"))) | |
:init | |
(defun my:find-file-tempbuf-hook () | |
(let ((ignore-file-names (mapcar 'expand-file-name my:tempbuf-ignore-files))) | |
(unless (member (buffer-file-name) ignore-file-names) | |
(turn-on-tempbuf-mode))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment