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 #244 received at 75626 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 75626 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#75626: 31.0.50; Dired misses or double-processes files when
 auto-revert-mode is enabled
Date: Mon, 27 Jan 2025 14:17:09 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Michael,

> Sorry for being late to the party, but last week I wasn't in the mood
> for any party. And honestly, it isn't much better now. But so what.

I'm sorry to hear.  I hope it gets better soon.

>> Could be.  One would need to look at each command.  Basically, the
>> issue of the two bugs can occur when auto-revert may happen which is
>> when Emacs is waiting for a process to finish (like in this bug) or
>> when waiting for user-input (like the confirmation prompt in
>> bug#71264).
>
> Auto-revert is triggered either by timers (polling) or by events (file
> notification). So yes, it is applied when either timers or event
> reading is in place.
>
> I believe it is good to have a mechanism like inhibit-auto-revert or
> dired--inhibit-auto-revert, in order to suppress auto-reverting
> temporarily. The problem is, that as now they have a nil-or-t value,
> which means that other auto-reverts are blocked also during this time,
> although they are not related.

That's not completely true in this case.  dired--inhibit-auto-revert is
buffer-local and won't disable other auto-reverts (even not of other
dired buffers).

(The idea with a inhibit-auto-revert variable has been canceled for the
time being.)

> No problem in case of polling (the next poll will do the auto-revert),
> but in case of file notifications the information is lost.

That's true.  But I think this is not a new issue.  I mean, that has
always happened when a buffer's buffer-stale-function returned nil for
whatever reason, e.g., in dired when wdired was active and thus
buffer-read-only was nil.

And is there a way to set up auto-revert in such a way that it *only*
uses file notifications and no polling at all?  Looking at the code, it
seems to me that file notifications just produce a quicker auto-revert
than polling (auto-revert-interval).  I'd assume that
auto-revert-interval seconds after inhibition (buffer-stale-function
saying "no" due to whatever reasons), the next auto-revert chance from
polling comes.

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.