summaryrefslogtreecommitdiff
path: root/emacs/emacs.el
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-09-12 12:50:47 +0200
committeralex <alex@pdp7.net>2023-09-12 12:50:47 +0200
commit20c16a70f5e44a4924169bf25b7df48751a7ef48 (patch)
treea38d7d3196aac0b25f6b397a0795f3743cafb38b /emacs/emacs.el
parentba989734d62919cb625277a24c59a4aa0b921231 (diff)
fix(emacs): complete backup settings
Diffstat (limited to 'emacs/emacs.el')
-rw-r--r--emacs/emacs.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs/emacs.el b/emacs/emacs.el
index 47fd77f7..cd4ba72d 100644
--- a/emacs/emacs.el
+++ b/emacs/emacs.el
@@ -53,9 +53,14 @@
;; Do not spill temporary files everywhere
+;; https://stackoverflow.com/a/18330742
(defvar --backup-directory (concat user-emacs-directory "backups"))
(if (not (file-exists-p --backup-directory))
(make-directory --backup-directory t))
+(setq backup-directory-alist `(("." . ,--backup-directory)))
+
+;; https://www.reddit.com/r/emacs/comments/tejte0/undotree_bug_undotree_files_scattering_everywhere/?rdt=39892
+(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
;; nicer completion UI