0

In order to prevent NFS caching from leading to stale files, I need to preserve the inode of a file when Emacs saves it. Normally, it does so anyway, but apparently not if backup files come into play.

One can test this easily by adding the following snippet to .emacs, forcing Emacs to create backups with every save:

(defun force-backup-of-buffer ()
  (setq buffer-backed-up nil))
(add-hook 'before-save-hook 'force-backup-of-buffer)

Can one make Emacs save files always in place?

1

You might like to set backup-by-copying for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.