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: Mon, 20 Jan 2025 21:05:20 +0100

Eli Zaretskii <[email-masked]> writes:

>> > And, btw, if we want this to be useful outside of Dired, we need to
>> > make this variable public, not internal.  That is, call it
>> > dired-inhibit-auto-revert.
>> 
>> Sorry, I can't follow. Why should a variable named dired-* be used
>> outside of dired?
>
> Not outside of dired, outside of dired.el.  There are two other
> dired-*.el files which might want to do that for some reason.

Would you get a warning when dired--inhibit-auto-revert defined in
dired.el was used in dired-aux.el or what is the problem?  I've though
"--" variables are only private by convention, and usually not private
to a file but to a package.

> Anyway, that other places could want to use this was not my
> suggestion, it was yours, AFAIR.

No, Michael's.

Anyway, after thinking a bit more about it: we could also have an even
more general inhibit-auto-revert in autorevert.el and bind that in the
expansion of dired-map-over-marks.  Then auto-revert-handler would test
inhibit-auto-revert even before consulting the buffer-stale-function.

WDYT?

Bye,
Tassilo