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

From: Marcus <[email-masked]>
Date: Sat, 3 Oct 2015 16:51:12 +0200

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?
This might even be useful default behavior.

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-10 on foutrelis
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description: Arch Linux

Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
  value of $LANG: en_DK.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  shell-dirtrack-mode: t
  evil-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-local-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Recent messages:
Making completion list... [2 times]
user-error: Previous command was not evil-repeat: exit-minibuffer
byte-code: Beginning of line [2 times]
Making completion list... [3 times]
Type C-w C-o to delete the help window.
Making completion list... [4 times]

Making completion list...

Buffer is read-only: #<buffer *Help*>
call-interactively: Buffer is read-only: #<buffer *info*>

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr jka-compr shell pcomplete comint
ansi-color emacsbug message idna format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils help-mode cus-edit cus-start cus-load wid-edit evil
evil-integration undo-tree diff evil-maps evil-commands
evil-command-window evil-types evil-search evil-ex evil-macros
evil-repeat evil-states evil-core advice help-fns evil-common windmove
thingatpt rect evil-digraphs evil-vars ring edmacro kmacro cl-loaddefs
cl-lib info easymenu package epg-config time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 174790 18817)
 (symbols 48 25241 0)
 (miscs 40 116 258)
 (strings 32 34539 6257)
 (string-bytes 1 914163)
 (vectors 16 18967)
 (vector-slots 8 478501 7318)
 (floats 8 83 350)
 (intervals 56 841 11)
 (buffers 960 16)
 (heap 1024 33073 1567))