bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-


From: Ben Gamari
Subject: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook
Date: Wed, 28 Oct 2015 18:05:51 +0100
User-agent: Notmuch/0.21~rc3+6~g4acbc1f (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu)

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

>>> Have you considered another solution, maybe by providing vc(-git)
>>> specific buffer-stale-function and revert-buffer? This would be much
>>> more in the spirit how autorevert is supposed to work. And this would
>>> simplify maintenance,
>>
>> Could you perhaps describe in a bit detail what the semantics of these
>> functions would be? I'm not entirely sure I understand what you are
>> proposing.
>
> As starting point you might read about `revert-buffer-function' in 
> (info "(elisp)Reverting") and about `buffer-stale-function' in
> (info "(emacs)Supporting additional buffers")
>
> See also in a dired buffer the values for both variables, and how the
> functions work for dired.

Thanks for the references.

I now have a better idea of what you are proposing. I do, however, fear
that your solution might be too large a hammer for the problem at hand.

Ultimately the problem here is an annoyingly narrow one, namely the fact
that auto-revert's action is correlated with file modifications due to
rebasing. For this reason I think it may be best to keep the solution
confined to auto-revert.

In particular, I'm afraid that the changing the semantics of
revert-buffer may break other users of this function who expect
its effect to be apparent immediately after invocation. It seems like
this approach may easily and unwittingly trade one subtle form of
breakage for another (even harder to find) one.

Cheers,

- Ben

Attachment: signature.asc
Description: PGP signature


reply via email to

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