When emacsEmacs 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 emacsEmacs 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 filehandlefile handle?
The latter convention is seen in a lot of other software. If emacsEmacs has this behavior, or can be configured to use it, for my purposes it would be savesafe to disable backup files (M-x customize-variable make-backup-files
).