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 #127 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: Mon, 20 Jan 2025 19:01:37 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

>> >> The macro itself should stay general & unassuming.
>> >
>> > The plan is to change dired-buffer-stale-p so that it returns nil
>> > when inhibit-read-only is bound to a non-nil value which is the
>> > case during the execution of the code generated by
>> > dired-map-over-marks and might catch other cases, too.  The macro
>> > itself stays as-is.
>> 
>> The missing part: this change hinders auto-revert-mode from reverting
>> the dired buffer during an operation on marked files.
>
> That shouldn't happen, IMO.  Too general,
> and I doubt it's needed.

This bug contains a recipe showing at least one ocassion where it is
needed.

> One might very well want to allow reversion
> during some particular operation on marked
> files.  Let's not assume otherwise.

Sure, and that's still allowed, e.g., the code given as BODY of
dired-map-over-marks could explicitly call revert-buffer if it can
handle the result.

The point is that auto-revert-mode reverts at _unpredictable_ moments
where chances are high that the dired buffer contents change in a way
that the processing logic goes wrong, e.g., a marked and not yet
processed file is now before point and will be skipped, or the other way
round, an already processed file is now after point and will be
processed again.

> An operation on marked files - which really
> means, for this macro, an operation on marked
> _lines_, CAN DO ANYTHING.  Whatever you might
> want to do to, or with, the Dired buffer
> display/listing you can do.  That is, you
> could until now, it sounds like.

I don't see what feature you think I have stolen from you.  We just
prevent auto-revert-mode from reverting the dired buffer as long as an
operation on marked files is in progress.  Progress is still visible
(SHOW-PROGRESS arg of dired-map-over-marks), i.e., the dired buffer is
periodically redisplayed showing the changes so far because that has
nothing to do with auto-revert-mode.

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.