mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-01-10 11:11:30 -08:00
fix: ensure auto-save file directory exists
Also don't create a tramp sub-directory, so we don't have to ensure two
directories.
Amend: 12e6027bda
This commit is contained in:
parent
bb9762bd03
commit
043000f2ca
1 changed files with 6 additions and 1 deletions
|
|
@ -117,9 +117,14 @@ possible."
|
|||
;; transform is better:
|
||||
auto-save-file-name-transforms
|
||||
`(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
|
||||
,(file-name-concat auto-save-list-file-prefix "tramp" "\\2-") sha1)
|
||||
,(file-name-concat auto-save-list-file-prefix "tramp-\\2-") sha1)
|
||||
("\\([^/]+\\)\\'" ,(file-name-concat auto-save-list-file-prefix "\\1-") sha1)))
|
||||
|
||||
(add-hook! 'auto-save-hook
|
||||
(defun doom-ensure-auto-save-prefix-exists-h ()
|
||||
(with-file-modes #o700
|
||||
(make-directory auto-save-list-file-prefix t))))
|
||||
|
||||
(add-hook! 'after-save-hook
|
||||
(defun doom-guess-mode-h ()
|
||||
"Guess major mode when saving a file in `fundamental-mode'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue