3 ms·
I can reproduce this in Emacs 28 and non 4.9.2 I have no idea how nano handles saving files but emacs seems to handle it safely as described and still hit the d
by michaelmrose 7y ago
I can reproduce this in Emacs 28 and non 4.9.2 I have no idea how nano handles saving files but emacs seems to handle it safely as described and still hit the dangerous case.
from the depths of basic-save-buffer-2
;; Write temp name, then rename it.
;; This requires write access to the containing dir,
;; which is why we don't try it if we don't have that access.
- photon-torpedo 7y agoThanks, indeed with nano I can reproduce this. One way to check how the editor behaves is to run ls -li run.sh before and after editing the script. The first number in the output is the inode of the file; if it stays the same then the file was overwritten.
- michaelmrose 7y agoit changes under both emacs and vim but not under nano. Neither vim nor emacs is overwriting it in place but both show the bad behavior on my end.