[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20943: 25.0.50; Dired buffers are not always auto-reverted
From: |
Michael Albinus |
Subject: |
bug#20943: 25.0.50; Dired buffers are not always auto-reverted |
Date: |
Fri, 10 Jul 2015 08:01:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> How about instead introducing a buffer-local variable, say
> auto-revert-when-modified, which Dired will set to a non-nil value,
> and auto-revert will test? Then, when this variable is non-nil,
> auto-revert could disregard the modified status, and revert the
> buffer, if stale, anyway.
I believe we could use the existing <foo>-stale-p mechanism for that
purpose. dired-stale-p shall decide to return a proper value, even if
the dired buffer is modified. It will follow the same logic as you have
proposed above. And we could implement different logic, depending
whether default-directory is a remote file name.
auto-revert-handler shall not cease to work unconditionally, when
buffer-modified-p is non-nil. This check shall be done only for buffers
with a related file (buffer-file-name is non-nil). For all other
buffers, <foo>-stale-p shall decide, whether buffer-modified-p must be
taken into account.
Thinking about, we might even extract a new function
auto-revert-buffer-with-file-stale-p from auto-revert-handler. This
would handle the case for buffers with a non-nil buffer-file-name.
auto-revert-handler would call always the buffer-local <foo>-stale-p
function; the code would be cleaner.
I will try to write such a patch if nobody beats me. Unfortunately, it
will take time; I'm still suffering from my health problems.
Best regards, Michael.
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Eli Zaretskii, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Michael Albinus, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Eli Zaretskii, 2015/07/10
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted,
Michael Albinus <=
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Eli Zaretskii, 2015/07/10
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Michael Albinus, 2015/07/10
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Michael Albinus, 2015/07/16
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/17
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Michael Albinus, 2015/07/18
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/18
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Michael Albinus, 2015/07/14
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/09
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Eli Zaretskii, 2015/07/10
- bug#20943: 25.0.50; Dired buffers are not always auto-reverted, Mark Karpov, 2015/07/10