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

From: Michael Heerdegen <[email-masked]>
Date: Sat, 25 Jan 2025 00:26:39 +0100

Tassilo Horn <[email-masked]> writes:

> >> So i would rather consider to rename the variable
> >> `buffer-stale-function' for the discoverability
>
> To what?

buffer-inhibit-auto-revert-function or buffer-inhibit-auto-revert.

> That aside, I think it's hard to rename and give new semantics to a
> variable which is as old as Emacs 22.1 and might be used by external
> packages.

Since we would only extend semantics and non-function values currently
raise an error - what would be the problem?

> > We could also rename the variable and pretend it is normally boolean -
> > but a function value is possible in addition and has a special
> > meaning.  A not uncommon solution.  Maybe this is what you had in
> > mind?
>
> At least not me.  One difference between buffer-stale-function and
> inhibit-auto-revert is that the latter inhibits all auto-reverts while
> buffer-stale-function is not consulted at all for file-visiting buffers
> when auto-revert-tail-mode is active.

Oh... I didn't notice that fact up to now.  Should we maybe document
that in the docstring of `buffer-stale-function'?

Anyway, if your goal is a switch that influences both modes, then my
approach would not be sufficient, obviously.

But did anybody think about typical use cases and what would be useful -
before we cut in stone a new mechanism with no use cases at all in mind?

> I don't have a strong preference for either way.  Maybe we should just
> keep it as-is until some other use-case besides dired pops up which
> might never happen.

A good summary - I would really prefer that to be honest.

Michael.