panzerjagerSS · 2022-11-04 16:42
after quitting emacs there is remaining \~ suffixed files. How to make them auto remove when quitting emacs? and what is the #file# files? sometimes im seeing them too.
Hammar_Morty · 2022-11-04 17:41
The #file# files are the auto save files that only exist when you have edited a file without saving it. The file~ files are backup files. Both file types can be set to be created in a directory so that you can still use these features without disabling them and not have them clutter your system. The configuration is an easy Google search so I'll leave that to you.
big_lentil · 2022-11-04 17:45
You might be interested in the no-littering package
EZHT · 2022-11-04 23:25
Personally, I have my Emacs configured to store all backup and
autosave files in the `/tmp` directory:
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
This way, you get the benefits of having them around, but they don't get in your way.
Agling · 2022-11-05 02:10
This is the smart solution. I have a folder called .trash in my home directory where all my auto save and backup files (along with other things I expect to delete) go. Periodically I will clear it out. These files never become a bother that way.
aqua0210 · 2022-11-05 05:55
I recommend you have a try [auto-save.el](https://github.com/manateelazycat/auto-save) , the default `auto-save-idle` is 1 second. So you don't need to care about saving files anymore.
panzerjagerSS · 2022-11-05 09:19
yes that makes sense
panzerjagerSS · 2022-11-05 09:32
Thanks for info. i was not know that
panzerjagerSS · 2022-11-05 09:32
i will look at it too thanks
panzerjagerSS · 2022-11-05 09:32
will look this too thanks
jherrlin · 2022-11-05 17:08
I to have them in a specific folder. I would argue that /tmp could be a troublesome location. If your system hangs and you have unsaved work, a system restart will destroy you unsaved work.
harunokashiwa · 2022-11-07 06:39
`(setq make-backup-files nil)`