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: Sun, 02 Feb 2025 12:10:20 +0100

Michael Albinus <[email-masked]> writes:

> It adds the global variable inhibit-auto-revert-buffers and the macro
> inhibit-auto-revert. I ran the recipe given in the original posting of
> this bug many times, even pressing 'Z' while the previous dired
> operation didn't finish, and it works as expected.
>
> Could you and Thassilo check this?

It works for me and my original problem, too.  Some questions, though.

Why is the macro inhibit-auto-revert defined in a progn?  I think, I've
never seen that before.

And why does dired-buffer-stale-p check if the current dired buffer is
member of inhibit-auto-revert-buffers?  Isn't the point to move the
allowance check from packages' buffer-stale-function to auto-revert
itself?  In that case, the buffer-read-only check (set by wdired-mode)
should probably also be rewritten to add the currently edited dired
buffer to inhibit-auto-revert-buffers and to remove it when wdired-mode
is deactivated (wdired-finish-edit).

Furthermore, the member check in auto-revert-buffer causes this buffer
to be removed from auto-revert-buffer-list meaning it will never ever be
reverted in the future, at least not by polling.

Bye,
Tassilo