fix: set tramp backup/autosave dirs in core

In 71eae25, TRAMP settings were moved to a new :emacs tramp module,
reverting `tramp-backup-directory-alist` and `tramp-auto-save-directory`
to their Emacs defaults for anyone not using this module (which saves
those temp files in the current working directory, which is an
undesirable default), so we set them in core again.

Fix: doomemacs/community#53
Amend: 71eae252ac
This commit is contained in:
Henrik Lissner 2025-11-30 23:51:18 -05:00
parent 51ef02595a
commit c523ee9586
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 5 additions and 6 deletions

View file

@ -91,7 +91,8 @@ possible."
delete-old-versions t ; clean up after itself
kept-old-versions 5
kept-new-versions 5
backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/"))))
backup-directory-alist `(("." . ,(concat doom-cache-dir "backup/")))
tramp-backup-directory-alist backup-directory-alist)
;; But turn on auto-save, so we have a fallback in case of crashes or lost data.
;; Use `recover-file' or `recover-session' to recover them.
@ -102,8 +103,8 @@ possible."
auto-save-include-big-deletions t
;; Keep it out of `doom-emacs-dir' or the local directory.
auto-save-list-file-prefix (concat doom-cache-dir "autosave/")
auto-save-file-name-transforms
(list (list ".*" auto-save-list-file-prefix t)))
auto-save-file-name-transforms `((".*" ,auto-save-list-file-prefix t))
tramp-auto-save-directory (concat doom-cache-dir "tramp-autosave/"))
(add-hook! 'after-save-hook
(defun doom-guess-mode-h ()