Prefix tramp auto-save files

Makes them easier to see and reduces the possibility of filename
conflicts with autosaves of local files.
This commit is contained in:
Henrik Lissner
2020-10-22 14:51:27 -04:00
parent 64ac1609dd
commit 9bbdacc79b

View File

@@ -102,7 +102,11 @@ possible."
auto-save-include-big-deletions t auto-save-include-big-deletions t
;; ...but have directories set up in case we use it. ;; ...but have directories set up in case we use it.
auto-save-list-file-prefix (concat doom-cache-dir "autosave/") 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
(list (list "\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
;; Prefix tramp autosaves to prevent conflicts with local ones
(concat auto-save-list-file-prefix "tramp-\\2") t)
(list ".*" auto-save-list-file-prefix t)))
(add-hook! 'after-save-hook (add-hook! 'after-save-hook
(defun doom-guess-mode-h () (defun doom-guess-mode-h ()