I have seen a lot of times that Emacs perform auto-save and I have some questions regarding it:
- What are the reasons for that?
- Where can I find the saved file?
- What are the advantages of having it activated?
- How can I deactivate it?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI have seen a lot of times that Emacs perform auto-save and I have some questions regarding it:
You should read the appropriate section of the Emacs Manual, but here is a quick overview:
Auto-save is a safeguard to prevent you from losing changes that have not yet been saved, should Emacs crash or be killed in some way. As with everything in Emacs, the behavior is configurable.
Emacs will automatically save a copy of the buffer after:
auto-save-interval
auto-save-timeout
When you visit a file, Emacs checks to see if there as an auto-save file that is newer than the file itself. If so, it offers to recover the auto-saved changes. See commands recover-file
and recover-this-file
.
By default auto-save files are written in the same place as the original file, with the name wrapped in #
characters. See auto-save-file-name-transforms
to change this.
To disable auto-save altogether, see auto-save-default
.
Note that auto-save files are usually cleaned up automatically: when you successfully save a set of changes Emacs will delete the no-longer needed auto-save file. See delete-auto-save-files
.