From: Nicolas Calderon <nicolas.calderon.asselin@gmail.com>
To: 20659@debbugs.gnu.org
Subject: bug#20659: auto-save-visited-file-name: leaks interlock files and abandons unsaved buffers
Date: Tue, 26 May 2015 01:38:54 -0400 [thread overview]
Message-ID: <CAHbMD+H5BLF5Z5w-N6sYOdQBrTHuErNnprsacH44T3eWZPwhiw@mail.gmail.com> (raw)
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
next reply other threads:[~2015-05-26 5:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 5:38 Nicolas Calderon [this message]
2021-01-23 21:45 ` bug#20659: auto-save-visited-file-name: leaks interlock files and abandons unsaved buffers Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHbMD+H5BLF5Z5w-N6sYOdQBrTHuErNnprsacH44T3eWZPwhiw@mail.gmail.com \
--to=nicolas.calderon.asselin@gmail.com \
--cc=20659@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).