When Emacs saves a file (save-buffer
, write-file
etc.), does it overwrite files directly or does it create a temporary file first?
More specifically, if I edit /path-to/file.txt
, will Emacs directly open that file and overwrite the contents in-place, or will it write to a temporary file and replace the original file by it after successfully closing the file handle?
The latter convention is seen in a lot of other software. If Emacs has this behavior, or can be configured to use it, for my purposes it would be safe to disable backup files (M-x customize-variable make-backup-files
).