GNU bug report logs - #20943
25.0.50; Dired buffers are not always auto-reverterd

Previous Next

Package: emacs;

Reported by: Mark Karpov <markkarpov <at> openmailbox.org>

Date: Tue, 30 Jun 2015 18:24:02 UTC

Severity: normal

Found in version 25.0.50

Done: Mark Karpov <markkarpov <at> openmailbox.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Karpov <markkarpov <at> openmailbox.org>
Cc: 20943 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
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 <markkarpov <at> openmailbox.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  20943 <at> debbugs.gnu.org
> 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.




This bug report was last modified 9 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.