summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-03-24 13:04:13 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-03-24 13:04:13 -0700
commitc8e51ad2cfd3963886fbdd8380dda59b97be6433 (patch)
tree564ff98a5a06fc033f20d409abf164a7a11e67c1
parent4dbaf33dd79ae712976ec3186e399193fc8fbd84 (diff)
downloaddotfiles-c8e51ad2cfd3963886fbdd8380dda59b97be6433.tar.gz
tidy up setting & preparing locations for Emacs auto-saves & backups
-rw-r--r--.emacs.d/init.el17
-rwxr-xr-xbin/bstraph4
2 files changed, 6 insertions, 15 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 8835138d..084e9f10 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -174,7 +174,9 @@ windows side-by-side in the frame."
'(appt-display-interval 6)
'(async-shell-command-buffer 'rename-buffer)
'(auth-source-save-behavior nil)
+ '(auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-saves/" t)))
'(backup-by-copying-when-linked t)
+ '(backup-directory-alist '(("." . "~/.emacs.d/backups/")))
'(bongo-default-directory "~/annex/music/")
'(bongo-insert-album-covers t)
'(bongo-insert-whole-directory-trees t)
@@ -441,6 +443,8 @@ windows side-by-side in the frame."
'(slime-load-failed-fasl 'never)
'(tab-bar-history-mode t)
'(tab-bar-show 1)
+ '(tramp-auto-save-directory "~/.emacs.d/auto-saves/" nil nil "Put TRAMP auto-saves under local `user-emacs-directory'.")
+ '(tramp-backup-directory-alist '(("." . "~/.emacs.d/backups/")) nil nil "Put TRAMP backups under remote ~/.emacs.d/.")
'(tramp-use-ssh-controlmaster-options nil nil nil "Rely on my ~/.ssh/config.")
'(tramp-verbose 1 nil nil "Manual says this should improve performance.")
'(transient-cycles-buffer-siblings-mode t)
@@ -736,19 +740,6 @@ that's something we can determine.")
;;;; System and files
-;; Put all auto-save files under ~/.emacs.d, both local and TRAMP. Put local
-;; backups under local ~/.emacs.d and TRAMP backups under remote ~/.emacs.d.
-;; E.g. when editing a file /sudo::/foo on laptop, its auto-saves will go to
-;; /home/spwhitton/.emacs.d but its backups will go to /root/.emacs.d.
-(let ((backups-dir (concat user-emacs-directory "backups/"))
- (auto-saves-dir (concat user-emacs-directory "auto-saves/")))
- (dolist (dir (list backups-dir auto-saves-dir))
- (make-directory dir t) (chmod dir #o700))
- (setq backup-directory-alist `(("." . ,backups-dir))
- auto-save-file-name-transforms `((".*" ,auto-saves-dir t))
- tramp-auto-save-directory auto-saves-dir
- tramp-backup-directory-alist backup-directory-alist))
-
;; On remote hosts in the UTC timezone, assume I'm in Arizona. This is
;; relevant for using Org-mode, dired timestamps, etc.. Note that hosts in
;; the UK will be in GMT or BST, not UTC, so this won't affect those.
diff --git a/bin/bstraph b/bin/bstraph
index 1cdef6e5..785bb30a 100755
--- a/bin/bstraph
+++ b/bin/bstraph
@@ -65,6 +65,6 @@ cd "$HOME"
include = cat ~/src/dotfiles/lib-src/mr/config
EOF
mkdir -p .ssh tmp src lib mnt \
- local/big local/pub local/auth \
+ local/big local/pub local/auth .emacs.d/auto-saves .emacs.d/backups \
local/src local/bin local/lib local/log local/tmp local/info
-chmod -R u+rwX,go= local/auth
+chmod -R u+rwX,go= local/auth .emacs.d/auto-saves .emacs.d/backups