GNU bug report logs - #75626
31.0.50; Dired misses or double-processes files when auto-revert-mode is enabled

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Fri, 17 Jan 2025 07:43:01 UTC

Severity: normal

Found in version 31.0.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 75626 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 "75626 <at> debbugs.gnu.org" <75626 <at> debbugs.gnu.org>, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: [External] : bug#75626: 31.0.50; Dired misses or
 double-processes files when auto-revert-mode is enabled
Date: Sun, 19 Jan 2025 00:43:03 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

>> 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?
>
> (Caveat: I'm not following this thread.)

The context is that commands like dired-do-compress which use
dired-map-over-marks can skip or double-process marked files in case the
dired buffer is reverted during the operation by auto-revert-mode (most
likely because the sorting order changes due to the suffix .gz being
removed or added).

> The doc string, and how those two are used in
> the code, tell you the answer.
>
> `dired-get-marked-files' just gives you a list
> of the marked files.  `dired-map-over-marks'
> is a macro, not a function, and it _processes_
> the files.

Ok, I should have said: why do some dired commands use
dired-get-marked-files together with some loop, and a processing
function while others use dired-map-over-marks with the processing code
as body?  I mean, both approaches do essentially the same but only the
latter is subject of the issue I've reported.

Is there some example dired command that can only work with
dired-map-over-marks and not by collecting all marked files at the
beginning?  It would need to be something where the processing code
marks files that haven't been marked before.  But I can't think of an
example where that would be desired.

Bye,
Tassilo




This bug report was last modified 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.