Subject: bug#20943: 25.0.50; Dired buffers are not always auto-reverted

From: Michael Albinus <[email-masked]>
Date: Thu, 09 Jul 2015 20:41:50 +0200

Mark Karpov <[email-masked]> writes:

> 1. In ‘auto-revert-handler’, autorevert modified files if current buffer
> is a Dired buffer:
>
> (defun auto-revert-handler ()
>   "Revert current buffer, if appropriate.
> This is an internal function used by Auto-Revert Mode."
>   (when (or auto-revert-tail-mode
>             (eq major-mode dired-mode)
>             (not (buffer-modified-p)))
>     ...))

I fear this is the wrong direction to fix it. `auto-revert-handler' shall
not know about major modes. All what a buffer has to say to
`auto-revert-handler' must be in `buffer-stale-function', which is set to
`dired-buffer-stale-p' here.

What happens, if you remove the test for `buffer-read-only' from that
function?

Best regards, Michael.