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: Fri, 24 Jan 2025 10:02:07 +0200

> From: Michael Heerdegen <[email-masked]>
> Cc: Tassilo Horn <[email-masked]>,  [email-masked],
>   [email-masked]
> Date: Fri, 24 Jan 2025 00:33:38 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > I tend to agree.  A boolean variable with "inhibit" in its name is
> > much easier discovered than buffer-stale-function.
> 
> Sure - but discoverability is not the only point to consider.  If I
> think this thought further:
> 
> In case of dired, the decision about whether the buffer should be
> auto-reverted is made by evaluating a (not trivial) condition and thus
> we use a function value.  This is hardly avoidable.
> 
> When we introduce a redundant new boolean variable, we would have to
> decide what happens when the two disagree - the result could be
> surprising.  And when one would need to debug auto revert, one would
> have to keep an eye on two variables instead of one.

We have quite a few of similar inhibit-SOMETHING variables in Emacs.
We use a simple rule for them: such a variable, when non-nil,
unconditionally overrides everything else.  I've never had any
problems with that, and I debug Emacs quite a lot.  It's actually the
other way around in many cases: being able to inhibit some
functionality by flipping a single variable is very easy and
convenient.

> A complication without any practical benefit IMO.

I think this opinion of yours is at least in part because you don't
appreciate the simplicity and convenience of a variable as opposed to
redefining or binding a function.

> As we saw, finding a fix for a simple related bug was already not
> easy.

For completely unrelated reasons, right?

> So i would rather consider to rename the variable
> `buffer-stale-function' for the discoverability - or just leave things
> as they are.

We cannot rename it.