diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2025-05-18 09:05:47 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2025-05-18 09:05:47 +0200 |
| commit | b58912746db33aef0b3dd844289b65b8a5b797e6 (patch) | |
| tree | ad03204cb140b09d8df720f20d8539575f091456 /config | |
| parent | 2f715699bd823df3dc08c5db3e667e069ff62856 (diff) | |
Dedicated Auto-Save Directory
Auto-saves were being written beside the editied files. We now change
the behavious to put all auto-saves beside the auto-saves list file to
not polute our development directories.
I decided against putting it in its own directory to avoid polluting
our `.emacs.d` even further.
Diffstat (limited to 'config')
| -rw-r--r-- | config/emacs/init.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/emacs/init.el b/config/emacs/init.el index f53dbe0..dbcd039 100644 --- a/config/emacs/init.el +++ b/config/emacs/init.el @@ -37,6 +37,10 @@ "Show trailing whitespace for the current buffer." (setq show-trailing-whitespace t)) +(defun init/auto-save-directory () + "The auto-save directory where the save file lives." + (file-name-directory (concat auto-save-list-file-prefix "1-localhost"))) + (defun init/open-init () "Opens the Emacs init.el configuration file." (interactive) @@ -87,6 +91,7 @@ (tab-width 2) (backup-by-copying t) (backup-directory-alist `((".*" . ,(init/expand-file-name "backup")))) + (auto-save-file-name-transforms `((".*" ,(init/auto-save-directory) t))) (create-lockfiles nil) (tab-width 4) (custom-file (init/expand-file-name "local-init.el"))) |
