Atomic rename versus in-place overwrite for Emacs file saves
Goal Select a save strategy for Emacs that protects against partial writes after a crash while preserving inodes for files reached through hard links or version-control working trees. Constraint In current Emacs releases, setting file-precious-flag makes Emacs write to a temporary file and rename it over the target, so a crash cannot leave a truncated or zer