GNU bug report logs -
#20659
auto-save-visited-file-name: leaks interlock files and abandons unsaved buffers
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20659 in the body.
You can then email your comments to 20659 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20659
; Package
emacs
.
(Tue, 26 May 2015 06:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nicolas Calderon <nicolas.calderon.asselin <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 26 May 2015 06:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
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
auto-save-mode (http://www.gnu.org/software/emacs/manual/html_node/elisp/Auto_002dSaving.html),
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
Message #6 received at 20659-quiet <at> debbugs.gnu.org (full text, mbox):
See bug 25470.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20659
; Package
emacs
.
(Sat, 23 Jan 2021 21:46:02 GMT)
Full text and
rfc822 format available.
Message #9 received at 20659 <at> debbugs.gnu.org (full text, mbox):
Nicolas Calderon <nicolas.calderon.asselin <at> gmail.com> writes:
> 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.
(I'm going through old bug reports that unfortunately got no response at
the time.)
I'm not able to reproduce this bug in Emacs 28, and indeed this has all
been rewritten in 2017:
commit 4db844a4532592ed2542c05a1747dad7ed319e15
Author: Philipp Stephani <phst <at> google.com>
AuthorDate: Sat Apr 22 20:58:38 2017 +0200
Reimplement auto-saving to visited files
This reacts to confusing behavior of 'auto-save-visited-file-name',
cf. Bug#25478.
So I'm going to go ahead and guess that this has been fixed by now, and
I'm closing this bug report. If there are still bugs in this area,
please respond to the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
20659 <at> debbugs.gnu.org and Nicolas Calderon <nicolas.calderon.asselin <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 23 Jan 2021 21:46:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 21 Feb 2021 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.