Subject: bug#23276: 25.0.92; Crash in auto-revert when file no longer present

From: Anders Lindgren <[email-masked]>
Date: Tue, 12 Apr 2016 13:07:48 +0200

Hi!

I just had auto-revert crash on me... (Emacs 25.0.92 on Windows.
`debug-on-error' is t.)

I had a file open in Emacs that was rewritten over and over again by an
external process. My guess is that Emacs decides that it should be
reverted, but when it actually reads the file, it is no longer present.

I would suggest that auto-revert silently ignores this error.

This is the backtrace (with simplified paths):

Debugger entered--Lisp error: (error "File e:/file.txt no longer exists!")
  signal(error ("File e:/file.txt no longer exists!"))
  error("File %s no longer exists!" "e:/file.txt")
  revert-buffer-insert-file-contents--default-function("e:/file.txt" nil)
  revert-buffer--default(ignore-auto dont-ask)
  revert-buffer(ignore-auto dont-ask preserve-modes)
  auto-revert-handler()
  auto-revert-buffers()
  apply(auto-revert-buffers nil)
  timer-event-handler([t 22284 48416 597024 5 auto-revert-buffers nil
nil 400000])

Sincerely,
    Anders Lindgren

In GNU Emacs 25.0.92.1 (i686-w64-mingw32)
 of 2016-03-21 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --host=i686-w64-mingw32 --without-dbus
 --without-compress-install CFLAGS=-static'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: SVE
  locale-coding-system: cp1252

Major mode: Compilation

Minor modes in effect:
  shell-dirtrack-mode: t
  dynamic-spaces-global-mode: t
  char-font-lock-global-mode: t
  global-auto-revert-mode: t
  global-cwarn-mode: t
  preproc-font-lock-global-mode: t
  highlight-doxygen-global-mode: t
  lisp-extra-font-lock-global-mode: t
  global-edit-server-edit-mode: t
  highlight2clipboard-mode: t
  minibuffer-electric-file-mode: t
  recentf-mode: t
  msb-mode: t
  multicolumn-global-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-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
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Auto-saving...done
Saving file
e:/src/Mystro-430/430-iasm/test/testcases/checklist/iasm/outr.c...
Wrote e:/src/Mystro-430/430-iasm/test/testcases/checklist/iasm/outr.c
Mark set
funcall-interactively: End of buffer [2 times]
Mark set
Compilation finished
Restarting server
next-line: End of buffer [6 times]
Making completion list... [2 times]

Load-path shadows:
e:/home/AndersL/emacs/lisp/table hides e:/Program
Files/emacs-25.0.92/share/emacs/25.0.92/lisp/textmodes/table
e:/home/AndersL/emacs/src/asm-mode-new/src/asm-mode hides e:/Program
Files/emacs-25.0.92/share/emacs/25.0.92/lisp/progmodes/asm-mode
e:/home/AndersL/.emacs.d/elpa/25.0.92.x/helm-core-20160331.118/helm-multi-match
hides
e:/home/AndersL/.emacs.d/elpa/25.0.92.x/helm-20160331.118/helm-multi-match
e:/home/AndersL/emacs/src/misc/c-clean-buffer hides
e:/src/emacs-modules/IAR/c-clean-buffer
e:/home/AndersL/emacs/lisp/wikipedia-mode hides
e:/src/emacs-modules/lisp/wikipedia-mode
e:/home/AndersL/emacs/src/misc/stdify hides e:/src/emacs-modules/lisp/stdify
e:/Program Files/emacs-25.0.92/share/emacs/25.0.92/lisp/progmodes/ruby-mode
hides e:/src/emacs-modules/lisp/ruby-mode
e:/home/AndersL/emacs/src/misc/preproc hides
e:/src/emacs-modules/lisp/preproc
e:/home/AndersL/emacs/src/misc/preproc-indent hides
e:/src/emacs-modules/lisp/preproc-indent
e:/home/AndersL/emacs/lisp/gnuserv hides e:/src/emacs-modules/lisp/gnuserv
e:/home/AndersL/emacs/lisp/dsvn hides e:/src/emacs-modules/lisp/dsvn
e:/home/AndersL/emacs/src/misc/ctypes hides e:/src/emacs-modules/lisp/ctypes
e:/home/AndersL/emacs/lisp/column-marker hides
e:/src/emacs-modules/lisp/column-marker
e:/home/AndersL/emacs/lisp/cmake-mode hides
e:/src/emacs-modules/lisp/cmake-mode
e:/home/AndersL/emacs/src/misc/c-indent-operator hides
e:/src/emacs-modules/lisp/c-indent-operator
e:/home/AndersL/emacs/src/misc/c-electric-operator hides
e:/src/emacs-modules/lisp/c-electric-operator

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
dired-aux t2-checklist yaml-mode font-lock-studio make-mode macros
t2-config cperl-mode vc-annotate burs-mode cc-langs add-log log-view
pcvs-util sh-script executable ffap url-parse auth-source mm-util
mail-prsvr password-cache url-vars ispell rect debug vc shell grep
compile pulse cmake-font-lock cmake-mode iar-trace-mode tags-extra
org-element org-rmail org-mhe org-irc org-info org-gnus gnus-util
org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb
org-w3m org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs format-spec cal-menu
calendar cal-loaddefs asm-mode eieio-opt speedbar sb-image ezimage
dframe find-func misearch multi-isearch apropos help-fns dabbrev
macrostep-c subr-x cmacexp macrostep pp end-of-buffer-log cap-words
superword subword doxygen c-align-operands ruby-mode smie thingatpt
vc-dispatcher cmake-cache iartags-visit-tags dired etags xref cl-seq
project eieio byte-opt bytecomp byte-compile cl-extra help-mode cconv
eieio-core ps-print ps-def lpr iaremacs-init t2-log-mode
t2-show-config-mode lockdir project-name view-all-targets edg-mode
site-start c-electric-operator vc-svn server dynamic-spaces
char-font-lock autorevert filenotify folding-isearch folding tail-mode
view cwarn cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs preproc-font-lock objc-font-lock
highlight-doxygen lisp-extra-font-lock edit-server highlight2clipboard
htmlize ange-ftp comint ansi-color ring paren mic-paren iso-insert
minibuf-elfile recentf tree-widget wid-edit msb multicolumn edmacro
kmacro easy-mmode autoload lisp-mnt finder-inf package easymenu time
lindydancer-theme old-emacs-support cl-macs derived advice cl gv
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded 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 w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 8 1762813 181390)
 (symbols 32 56055 44)
 (miscs 32 2037 11084)
 (strings 16 204630 26517)
 (string-bytes 1 6691609)
 (vectors 8 47367)
 (vector-slots 4 1844109 23864)
 (floats 8 675 741)
 (intervals 28 276896 223)
 (buffers 520 201))