Subject: bug#75626: 31.0.50; Dired misses or double-processes files when auto-revert-mode is enabled

From: Tassilo Horn <[email-masked]>
Date: Sun, 02 Feb 2025 10:31:55 +0100

Michael Heerdegen <[email-masked]> writes:

>> I know, that the variant with 'inhibit-auto-revert' has been
>> refused. However, I repeat this proposal. The difference is, that I
>> propose not to use t and nil as values, but a list of buffers or
>> nil. By this, a buffer could be suppressed temporarily from
>> auto-revert by adding it to this list, for example in a let-bind.
>
> But this will come with the same problems - or we need to change each
> command individually and third party packages can still be affected by
> the same issue - which is something I rather would prefer to avoid.
>
> What advantage would your approach have?  A global variable bound to a
> list of buffers has its advantages, but also its disadvantages, it
> still has to be kept up to date explicitly, dead buffers have to be
> removed, etc.  What you say seems a bit unrelated to what I outlined.

Yes, I have the basically the same questions.  IIRC, the problem you,
Michael A., wanted to address in your proposal was that if a buffer has
been skipped during auto-revert and the trigger for auto-revert was a
filesystem notification, the auto-revert should be retried later.

But isn't that the case anyway because auto-revert-buffers is run from a
timer every auto-revert-interval seconds, so unless one sets
auto-revert-interval to some very high value, no harm is done?

Even if we would like to cater for this case, I don't understand how
your approach addresses the retries for buffers that skipped/inhibited
auto-revert.  I mean, I can envision that auto-revert maintains a list
of buffers it skipped but how would that be worked through?  Another
timer that runs more often that auto-revert-interval?

One fact in favour for some inhibit-auto-revert variable is that
currently we abuse buffer-stale-function whose docs state "Function to
check wether a buffer _needs_ reverting" with functions that actually
check if we need and _allow_ reverting.  If we had inhibit-auto-revert,
the allowance part could and should be removed from
buffer-stale-function.

Bye,
Tassilo