Subject: bug#43412: [FEATURE] autorevert-only-if-visible [PATCH]

From: Michael Albinus <[email-masked]>
Date: Tue, 15 Sep 2020 20:47:05 +0200

Boruch Baum <[email-masked]> writes:

Hi Boruch,

> The attached proposed patch adds a defcustom and makes a change to two
> existing functions in order to allow a user the option to only have
> autorevert mode operate on visible buffers. The change to function
> 'after-find-files' may also fix a bug (or change behavior) in that
> sometimes when being prompted to manually revert a buffer that had been
> in auto-revert-mode, the auto-revert-mode status would be lost, ie. set
> to nil.

I haven't tested your patch, but I'm asking myself whether it cooperates
with autorevert triggered by file notifications. That is, if a file
changes on disk, a notification event is sent, and autovert happens. If
autorevert does not happen because the buffer is not visible, this event
will be lost, and no autorevert will happen later on when the buffer
becomes visible.

Have you tested this scenario?

Best regards, Michael.