From 3dfb796ec572cbf4f2abc5ca11dbda451803e779 Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Tue, 9 Jul 2019 19:05:41 -0400 Subject: [PATCH] Store saves in .emacs.d/saves instead of /tmp --- lain/.emacs.d/config.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lain/.emacs.d/config.org b/lain/.emacs.d/config.org index 9313b84..850e745 100644 --- a/lain/.emacs.d/config.org +++ b/lain/.emacs.d/config.org @@ -363,12 +363,13 @@ Make =yes-or-no= prompts ask for =y-or-n= instead. Saves loads of timeā„¢. #+END_SRC *** Move Backup Files By default, emacs gunks up every folder with =file~= backups -and =#file#= lockfiles. Schlunk them all in =/tmp= instead. +and =#file#= lockfiles. Schlunk them all in =.emacs.d/saves= instead. #+BEGIN_SRC emacs-lisp - (setq backup-directory-alist - `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) + (let ((save-dir (locate-user-emacs-file "saves"))) + (setq backup-directory-alist + `((".*" . ,save-dir))) + (setq auto-save-file-name-transforms + `((".*" ,(concat save-dir "/") t)))) #+END_SRC *** Secure auth-source GPG encrypt stored auth tokens from [[https://www.gnu.org/software/emacs/manual/html_mono/auth.html][auth-source]] instead of storing them in plaintext.