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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 23 Jan 2025 11:13:12 +0200

> From: Tassilo Horn <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,   [email-masked],
>    [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.

I tend to agree.  A boolean variable with "inhibit" in its name is
much easier discovered than buffer-stale-function.