[Top][All Lists]

[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: Eli Zaretskii
Subject: bug#20943: 25.0.50; Dired buffers are not always auto-reverted
Date: Fri, 10 Jul 2015 08:46:27 +0300

> From: Mark Karpov <address@hidden>
> Cc: Eli Zaretskii <address@hidden>,  address@hidden
> Date: Fri, 10 Jul 2015 01:42:38 +0600
> Frankly, you have three concepts that control behavior of
> ‘auto-revert-mode’:
> * buffer associated with file (this may be used as «fourth notion»,
>   although I don't know which buffers else are not associated with
>   files, chances are the new behavior is not very good for anything
>   other than Dired),
> * modified buffer,
> * stale buffer.
> This is not enough to implement this new behavior, you need more
> information about buffer now. So, you need fourth notion that would tell
> you if current buffer is such that you can revert it even if it's
> modified.
> Now, if you like to keep it on more abstract level, you can introduce
> some notion for this sort of buffers, buffers that should be reverted by
> ‘auto-revert-mode’ even when they are modified.
> You can introduce a list that will enumerate major modes that define
> such buffers, or implement it in some other way. Then you can have a
> predicate that will tell you what if you're in such a special buffer or
> not.

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]