From b58912746db33aef0b3dd844289b65b8a5b797e6 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Sun, 18 May 2025 09:05:47 +0200 Subject: 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. --- config/emacs/init.el | 5 +++++ 1 file changed, 5 insertions(+) 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"))) -- cgit v1.2.3