GNU bug report logs - #23276
25.0.92; Crash in auto-revert when file no longer present

Previous Next

Package: emacs;

Reported by: Anders Lindgren <andlind <at> gmail.com>

Date: Tue, 12 Apr 2016 11:09:01 UTC

Severity: normal

Found in version 25.0.92

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 23276 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Anders Lindgren <andlind <at> gmail.com>
Cc: 23276 <at> debbugs.gnu.org
Subject: Re: bug#23276: 25.0.92;
 Crash in auto-revert when file no longer present
Date: Sat, 16 Apr 2016 20:44:18 +0200
Anders Lindgren <andlind <at> gmail.com> writes:

> Hi!

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've tried to write a test case for this, but I've failed. Do you have a
recipe to provoke this error?

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

Yep. Does anybody object to install the following patch in the emacs-25 branch?

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-25/lisp/autorevert.el.~f3653ec446ed95404889cf16c67b2d96b3955f52~	2016-04-16 20:38:55.247491182 +0200
--- /home/albinus/src/emacs-25/lisp/autorevert.el	2016-04-16 20:36:29.485457375 +0200
***************
*** 684,690 ****
          ;; not to forget that.  This gives undesirable results when
          ;; the file's mode changes, but that is less common.
          (let ((buffer-read-only buffer-read-only))
!           (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
        (when buffer-file-name
          (when eob (goto-char (point-max)))
          (dolist (window eoblist)
--- 684,691 ----
          ;; not to forget that.  This gives undesirable results when
          ;; the file's mode changes, but that is less common.
          (let ((buffer-read-only buffer-read-only))
!           (ignore-errors
!             (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))))
        (when buffer-file-name
          (when eob (goto-char (point-max)))
          (dolist (window eoblist)
--8<---------------cut here---------------end--------------->8---

> Sincerely,
> Anders Lindgren

Best regards, Michael.




This bug report was last modified 3 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.