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

From: Boruch Baum <[email-masked]>
Date: Tue, 15 Sep 2020 12:12:39 -0400

On 2020-09-15 18:49, Eli Zaretskii wrote:
> > Date: Tue, 15 Sep 2020 11:39:58 -0400
> > From: Boruch Baum <[email-masked]>
> > Cc: [email-masked]
> >
> > > Btw, what will be the effect of this option?  Suppose some buffer was
> > > not displayed and missed its auto-revert opportunity.  Then I switch
> > > to it in some window -- will it appear with stale contents, or will it
> > > auto-revert before being displayed in the window?
> >
> > I kind of mentioned this in my note: From my testing, at the instant an
> > un-reverted buffer is displayed, it is in its 'stale' state but is also
> > instantly considered for auto-revert.
>
> Maybe we should arrange it to actually auto-revert before being
> displayed.  I envision bug reports if we don't.

Do you have a strategy or implementation in mind? Would adding a
function to `window-configuration-change-hook' do the trick (ie. catch
all relevant events)?

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0