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

From: Tassilo Horn <[email-masked]>
Date: Thu, 23 Jan 2025 07:26:50 +0100

Michael Heerdegen <[email-masked]> writes:

>> Anyway, below the current patch.  It would be great if someone else
>> could test it, too.
>>
>> Obviously, the new inhibit-auto-revert should be mentioned in NEWS and
>> the elisp info docs which I'll do and post the final patch for review
>> before committing.
>
> I'm a bit late, and very sorry for that,

I'm not in a hurry.

> but: doesn't this just introduce a restricted twin of
> `buffer-stale-function'?  This variable is already buffer local in
> dired buffers and can be used for the same purpose - or do I miss
> something?

You are essentially right.  If some code wants to inhibit auto-revert it
could also do (let ((buffer-stale-function #'ignore)) ...) although, I
think, that auto-revert-tail-mode could still tail-revert for
file-visiting buffers.

That said, I think the new inhibit-auto-revert is much clearer in what
it does.  We already have a lot of inhibit-* variables, so that's where
I would look first when my aim is to inhibit some action.  FWIW, until a
week ago, I had no clue that there is a buffer-stale-function and that
it has something to do with auto-revert.  (It probably also has other
uses, so maybe let-binding it to #'ignore could have side-effects.)

Bye,
Tassilo