[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20659: auto-save-visited-file-name: leaks interlock files and abando

From: Nicolas Calderon
Subject: bug#20659: auto-save-visited-file-name: leaks interlock files and abandons unsaved buffers
Date: Tue, 26 May 2015 01:38:54 -0400


When auto-save-visited-file-name is set, emacs auto-saves directly to
file rather than a different file (#<filename>#). Unfortunately,
auto-saving does not get rid of the interlock file (symlink from
.#<filename> -> <user>@<host>.<pid>:<uid>). Since the buffer is saved
and not modified (buffer-modified-p is false, as evidenced by the
modline), emacs can be exited without the "Save file?" prompt. Leaving
emacs at this point, without making a proper save (save-buffer),
leaves the interlock files behind modifications directly to the file
rather than auto-saving.

While looking at that, I noticed something a bit more "dangerous".
Normally, auto-save-visited-file-name is only enabled upon restarting
and indeed, if auto-save-visited-file-name is set and auto-save-mode,
emacs keeps saving auto-saves under #<filename># and not directly to
file. After an auto-save though, the file is marked as not modified
(buffer_modified-p is false). At this point, if the user leaves emacs,
their file is not saved and the user is not prompted for saving!!! The
content of the file can still be recovered from the auto-save file.

Nicolas Calderon Asselin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]