Subject: bug#21612: 24.5; Configuration variable to delete auto-save file when intentionally killing buffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 16 Aug 2021 14:36:40 +0200

Marcus <[email-masked]> writes:

> Recipe for recreating:
> Start Emacs: `emacs -Q'
> Visit a file, e.g.: `C-x C-f RET test-file RET'.
> Change the file, e.g.: `M-> Will this auto-save?'
> Trigger auto-save, e.g. by idling for 30 seconds
> Quit Emacs: `C-x C-c RET'
> Don't save the file: `n yes RET'
> Start Emacs again: `emacs -Q'
> Visit the same file, e.g.: `C-x C-f RET test-file RET'
> Message "test-file has auto save data; consider M-x recover-this-file"
> appears.
>
> Since the buffer was killed intentionally, shouldn't it be possible to
> configure Emacs such that the auto save file will be deleted?

I think that sounds like a reasonable feature -- I can see people
getting annoyed at Emacs' behaviour here.  Perhaps the way to implement
this would be to:

Quit Emacs: `C-x C-c RET'
Save file: `n'
Delete auto-save file?: `yes RET'

That is, introduce a new option that would offer to delete auto-save
files for buffers the user chooses not to save.  This could even be done
generally -- not just during shutdown -- afer the

Buffer foo modified; kill anyway? yes RET

dialogue.  (This would be an opt-in user option, of course, because the
current behaviour is safer.)

Any opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no