Replies: 2 comments 1 reply
-
|
I think this is a bug in Doom. I noticed it a while ago and fixed it in my private config, but I never got around to reporting it to Doom. Does adding the following to your config.el fix the issue? ;; in $DOOMDIR/config.el
(setq tramp-auto-save-directory "~/.cache/doom/tramp-autosave/")
(after! doom-editor
;; TODO: PR or issue
(defadvice! doom-make-hashed-auto-save-file-name-a (fn)
"Compress the auto-save file name so paths don't get too long."
:around #'make-auto-save-file-name
(let ((buffer-file-name
(if (or
;; Don't do anything for non-file-visiting buffers. Names
;; generated for those are short enough already.
(null buffer-file-name)
;; If an alternate handler exists for this path, bow out. Most of
;; them end up calling `make-auto-save-file-name' again anyway, so
;; we still achieve this advice's ultimate goal.
(find-file-name-handler buffer-file-name
'make-auto-save-file-name))
buffer-file-name
;;CHANGED
(concat (or (and (string-match-p "/tramp-autosave/" buffer-file-name)
(file-name-directory buffer-file-name))
"")
(sha1 buffer-file-name)))))
(funcall fn)))) |
Beta Was this translation helpful? Give feedback.
-
|
The tramp defaults were moved to a new The quick fix is to enable Otherwise, a much simpler version of AjaKN's fix: (setq tramp-auto-save-directory (concat doom-cache-dir "tramp-autosave/")
tramp-backup-directory-alist backup-directory-alist)In any case, I'll move these two variables back to Doom core soon so the module isn't required for these files. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I confirm that...
I searched the FAQ, issue tracker, discussions board, documentation, and wiki, and did not find an answer to my question.
Any discussions with or conclusions derived from the use of LLMs will be omitted from my question.
What is your question?
When using magit with a tramp/ssh connection to a remote host, I get a lot of files with a pattern similar to:
#e47ad05cdf18bc34d69df0d782ea216e1c180392#.~;0f6e0f8538628bb10e9436831351f7564cea165b~which seems to contain a copy of files with changes not yet commited. These files are still present even after commiting changes ending up cluttering the repository. It seems like I have to remove these files manually.
This is of course just a minor annoyance and I could limit it by adding those to my
.gitgnorebut that doesn't really solve the actual problem.It has been a bit hard for me to try to find anything related to this issue as this doesn't seem to be related to where tramp stores temporary files (they are in
/tmpas expected) and it's kind of hard to search for a pattern matching these files.I also don't know if this is actually related to doom emacs but I haven't done any special configuration so this is just magit+tramp "out of the box" with doom emacs.
Any way to avoid having to clean up these files would be appreciated as well as pointers to where I might find more information.
Thanks a lot.
System information
https://gist.github.com/laudrup/33ea96dc60a335316967ca26d0956ba4
Beta Was this translation helpful? Give feedback.
All reactions