Subject: bug#52242: 29.0.50; Feature Request: Offer to run`diff-buffer-with-file' in `recover-this-file' prompt

From: Visuwesh <[email-masked]>
Date: Thu, 2 Dec 2021 13:28:24 +0100 (CET)

`recover-this-file' quite helpfully shows the time of creation of the
auto-save file.  However, this is not always enough to decide whether I
should recover from said auto-save file since there's no way of knowing
if the changes in auto-save file are desirable [1] so I end up answering
yes, then run `diff-buffer-with-file' anyway.  I think having a
`diff-buffer-with-file' option like `save-some-buffers' would be a
quality-of-life improvement.

Thanks.
[1] I fat finger my keyboard quite a lot and end up garbling the file
even after explicitly saving the buffer.  When I open the file in a new
Emacs session again, I get suggested to `recover-this-file' and 8/10
times, I have to undo.  Having a diff option directly in the prompt
would save some keystrokes.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
Repository revision: da67e888d5360297cdf20cd3d2a1148727d16e5a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12012000
System Description: NixOS 21.11 (Porcupine)

Configured using:
'configure
--prefix=/nix/store/mlv737k3wph8lhxi2lm9942kbm31wmdz-emacs-gcc-20211030.0
--disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
--with-cairo --with-native-compilation'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH:
  value of $EMACSNATIVELOADPATH: /nix/store/hagxad2bnmdwy79yjkvkwjjynxpik7fw-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  TeX-PDF-mode: t
  recentf-mode: t
  paredit-mode: t
  eros-mode: t
  flymake-mode: t
  hl-todo-mode: t
  pdf-occur-global-minor-mode: t
  shell-dirtrack-mode: t
  minibuffer-depth-indicate-mode: t
  repeat-mode: t
  display-time-mode: t
  display-battery-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/viz/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/hagxad2bnmdwy79yjkvkwjjynxpik7fw-emacs-packages-deps/share/emacs/site-lisp/site-start
/home/viz/lib/emacs/straight/build/map/map hides /nix/store/mlv737k3wph8lhxi2lm9942kbm31wmdz-emacs-gcc-20211030.0/share/emacs/29.0.50/lisp/emacs-lisp/map
/home/viz/lib/emacs/straight/build/let-alist/let-alist hides /nix/store/mlv737k3wph8lhxi2lm9942kbm31wmdz-emacs-gcc-20211030.0/share/emacs/29.0.50/lisp/emacs-lisp/let-alist

Features:
(shadow sort emacsbug sendmail reporter preview tex-buf
latex-mode-expansions latex latex-flymake tex-ispell tex-style tex crm
trace edebug hippie-exp re-builder holidays hol-loaddefs cal-move
autoload math-delimiters cursor-sensor org-pdftools pdf-annot facemenu
org-noter executable time-stamp comp comp-cstr cl-print debug backtrace
thai-util thai-word misearch multi-isearch view mule-util
ement-room-list ement ement-notify ement-room ewoc ement-api
ement-structs ement-macros plz dns ts s etags fileloop xref rect
mail-extr wdired dired-aux shortdoc dired-x help-fns radix-tree
expand-region text-mode-expansions cc-mode-expansions
the-org-mode-expansions er-basic-expansions expand-region-core
expand-region-custom pulse color reveal recentf tree-widget vc-git
diff-mode vc-dispatcher server paredit edmacro kmacro eros checkdoc
lisp-mnt flymake-proc flymake project hl-todo writegood-mode-autoloads
ement-autoloads ts-autoloads s-autoloads map-autoloads plz-autoloads
transmission-autoloads lua-mode-autoloads nix-mode-autoloads
magit-section-autoloads racket-mode-autoloads eros-autoloads
flymake-shellcheck-autoloads avy avy-autoloads siege-mode
siege-mode-autoloads paredit-autoloads expand-region-autoloads
filladapt-autoloads compose quail notifications org-capture doct
warnings org-refile org-clock scroll-other-window org-pdftools-autoloads
org-noter-autoloads finder-inf pdf-occur ibuf-ext ibuffer
ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
pdf-isearch let-alist pdf-misc imenu pdf-tools package url-handlers
compile cus-edit pdf-view bookmark pp pdf-cache pdf-info tq pdf-util
pdf-macs pdf-tools-autoloads let-alist-autoloads tablist-autoloads
math-delimiters-autoloads doct-autoloads valign flyspell ispell
face-remap goto-addr org-indent org-num org-element avl-tree generator
ol-eww eww xdg url-queue thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art
mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom
browse-url gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr
image-mode exif dired dired-loaddefs ol-bibtex ol-bbdb ol-w3m ol-doi
org-link-doi ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs ob-shell shell ob-racket dash async
ob-async org-starless cdlatex texmathp org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
pcomplete comint ansi-color ring org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table
oc-basic bibtex iso8601 time-date ol org-keys oc org-compat advice
org-macs org-loaddefs find-func ob-async-autoloads dash-autoloads
async-autoloads emacs-ob-racket-autoloads valign-autoloads easy-mmode
org-starless-autoloads cdlatex-autoloads auctex-autoloads tex-site tempo
derived mb-depth cus-load repeat visual-fill-autoloads
olivetti-autoloads hl-todo-autoloads moody-autoloads time format-spec
battery dbus filenotify xml disp-table vz-nh-theme shell-command+
shell-command-plus-autoloads icalendar diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse auth-source eieio
eieio-core eieio-loaddefs password-cache json map url-vars mailcap rx
chemtable chemtable-autoloads molar-mass-autoloads pcase
straight-autoloads info cl-seq cl-extra help-mode straight cl-macs
cl-loaddefs cl-lib seq gv subr-x byte-opt bytecomp byte-compile cconv
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 1208185 292637)
(symbols 48 42228 4)
(strings 32 303314 43731)
(string-bytes 1 8562492)
(vectors 16 108614)
(vector-slots 8 2355085 365629)
(floats 8 691 1499)
(intervals 56 52079 12887)
(buffers 992 50))