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: Tue, 21 Jan 2025 14:34:29 +0200

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

Yes, I think this is even better, thanks.

But let's first wait for Michael Albinus (CC'ed) to chime in, in case
he has comments or objections.