GNU bug report logs -
#21612
24.5; Configuration variable to delete auto-save file when intentionally killing buffer
Previous Next
Reported by: Marcus <mrok4a <at> gmail.com>
Date: Sat, 3 Oct 2015 16:37:01 UTC
Severity: wishlist
Tags: moreinfo
Found in version 24.5
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #37 received at 21612 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: mrok4a <at> gmail.com, 21612 <at> debbugs.gnu.org, Richard M. Stallman <rms <at> gnu.org>
> Date: Wed, 18 Aug 2021 14:45:21 +0200
>
> diff --git a/src/buffer.c b/src/buffer.c
> --- a/src/buffer.c
> +++ b/src/buffer.c
> @@ -1370,11 +1370,13 @@
> - /* Delete any auto-save file, if we saved it in this session. */
> + /* Delete any auto-save file, if we saved it in this session.
> + But not if the buffer is modified. */
> if (STRINGP (b->auto_save_file_name)
> && b->auto_save_modified != 0
> - && BUF_SAVE_MODIFF (b) < b->auto_save_modified)
> + && BUF_SAVE_MODIFF (b) < b->auto_save_modified
> + && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
> {
> Lisp_Object tem;
> tem = Fsymbol_value (intern ("delete-auto-save-files"));
> if (! NILP (tem))
> internal_delete_file (b->auto_save_file_name);
> }
>
> No now this option is basically pointless (when killing buffers) -- the
> only reason we'd want to delete an auto-save file is if the buffer is
> modified. Otherwise there won't be an auto-save file. (Except when
> it's made by a different Emacs, and in that case, we really shouldn't be
> deleting it anyway.)
We could make that variable have a third value, which would then
override the above logic, no?
> The commit message or the comments don't explain what the reasoning
> behind changing the semantics here were.
>
> Richard, do you have any recollection why you made these changes 20
> years ago? They seem to make the delete-auto-save-files variable in a
> kill-buffer context pointless.
I guess the reason was the fear of losing edits, as discussed
previously. But if the user explicitly wants to take those risks,
it's okay, especially if we ask for confirmation.
This bug report was last modified 3 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.