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, 17 Jan 2025 15:26:42 +0200

> From: Tassilo Horn <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 17 Jan 2025 14:03:18 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > So I think an easier solution would be to temporarily disable
> > auto-revert-mode while the command runs.
> 
> First, I wanted to say that this wouldn't help because nobody hinders
> the user to refresh himself.

Sure, but is this a reasonable solution?  Users who turn on
auto-revert-mode don't expect to need to revert manually, I think.

> But apparently no matter how hard I try to
> hit g after starting the Z operation on all files, I can't reproduce the
> issue.  I even ramped up to 1000 instead of 100 files.
> 
> What is the difference between auto-revert and manually reverting?  It
> seems that with just manual reverting (repeatedly hitting g during the
> (un)compress operation on many files), I only get one refresh initially
> which doesn't change the sorting order (or possibly only with very exact
> timing) and then Emacs is blocked until all files are (un)compressed.
> With auto-revert-mode, I get many intermediate refreshes during the
> operation.

Yes, because auto-revert-mode works as part of the Emacs's main loop,
whereas user input is processed only when Emacs is idle.

Does let-binding inhibit-redisplay in the auto-revert function help in
any way?