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

From: Michael Albinus <[email-masked]>
Date: Tue, 12 Apr 2016 18:14:55 +0200

Eli Zaretskii <[email-masked]> writes:

>> Date: Tue, 12 Apr 2016 13:07:48 +0200
>> From: Anders Lindgren <[email-masked]>
>> 
>> I just had auto-revert crash on me... (Emacs 25.0.92 on Windows. `debug-on-error' is t.)
>
> I don't see any crash, just an error that was signaled.  Am I missing
> something?

No, it's an error. I guess Anders meant "crash *of* auto-revert"
 
>> 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.
>
> Ignore and empty the buffer, or ignore and leave it at its previous
> contents?

The latter one. Anders has explained me that there is a design goal of
auto-revert, to leave the buffer unchanged in such cases. A user could
have deleted the file by accident, and she could use the unchanged
buffer for restoring the file.

I'll try to prepare a patch. If it is as simple as I do expect, it could
go to the emacs-25 branch.

Best regards, Michael.