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: Mon, 20 Jan 2025 14:25:23 +0100

Eli Zaretskii <[email-masked]> writes:

> But inhibit-read-only is also nil in WDired.  Do we want to disable
> auto-revert in that case?

It already is (via buffer-read-only), and everything else would be a catastrophy.

> Why don't you prefer the new dired--map-over-marks-in-progress
> variable idea?  Or Drew's suggestion to bind revert-buffer-function to
> 'ignore while dired-map-over-marks runs?  Both sound cleaner to me
> than relying on inhibit-read-only, which is used in gazillion places.

FWIW, I have checked all of them appearing in dired.

While it is very likely that it is good to prevent an auto revert
happening in the middle of any operation, the considerations of this
being bad in some case seem quite theoretical to me.

If we really go the `revert-buffer-function' way, we would need to check
that this doesn't have side effects, because the code that auto reverts
still is executed and thinks that revert has been successfully
performed.  We should then also check what happens when the directory is
remote or handled by tramp, auto-revert-handler is set, such things.

Introducing `dired--map-over-marks-in-progress' sounds cleaner to me
than that.

Michael.