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: Sat, 18 Jan 2025 09:42:11 +0100

Michael Heerdegen <[email-masked]> writes:

>> Well, there are exactly 100 files.  So it processed 62 files twice,
>> compressing them first and then uncompressing them again (or skipped
>> some and processed other even more).
>
> It could be that the order of the marked files changed after
> reverting.
>
> But even if not: if you look at the use of the variable
> `next-position' in `dired-map-over-marks', it is also possible to get
> such an effect if the line lengths change.
>
> So the command `dired-do-compress' is not robust against this effect.
> Other commands calculate the complete list of marked files first,
> `dired-do-chxxx' and `dired-do-chmod' for example.  So I think it is
> not unavoidable that it is like that.

What is the reason that there are two different approaches to process
all marked files, i.e., dired-map-over-marks vs. dired-get-marked-files?

Bye,
Tassilo