[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21729: doc-view messed up by early auto-revert
From: |
Tassilo Horn |
Subject: |
bug#21729: doc-view messed up by early auto-revert |
Date: |
Fri, 23 Oct 2015 12:08:26 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Nicolas Richard <youngfrog@members.fsf.org> writes:
> Tassilo Horn <tsdh@gnu.org> writes:
>> I think in doc-view-mode it's obvious enough when a file is being
>> reverted, so maybe we should set auto-revert-verbose to nil
>> buffer-locally?
>
> Sometimes emacs does weird things, and I think it's nice if it
> explains what it does, even if it should be obvious. Morever the
> message is not only useful while the file is being reverted, but also
> after the fact. e.g. if I have foo.pdf open, and that file is
> controlled by owncloud and gets updated by the cloud, I like to find
> this information in *Messages*.
Yes, I see. But then we could still set `auto-revert-verbose' to nil
buffer-locally and issue that message in `doc-view-revert-buffer'. The
problem with the message from autorevert.el is that it'll be displayed
even though doc-view decides that it cannot auto-revert right now
because the file is corrupted/not ready yet.
Alternatively, we could of course enhance autorevert.el, e.g., by
introducing some buffer-local variable `auto-revert-predicate' which is
run by auto-revert in order to test if the current buffer can be
reverted right now. That could then be used by doc-view, and I guess
there are other modes which could make use of such a feature, too.
Stefan, do you think that would be a good idea?
Bye,
Tassilo