[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoiding revert-buffer after vc-checkin
From: |
Stefan Monnier |
Subject: |
Re: avoiding revert-buffer after vc-checkin |
Date: |
Wed, 18 Jul 2007 22:57:44 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
>> Indeed. My own take on this problem is to change revert-buffer so that it
>> doesn't throw away the undo info.
> Revert-buffer throws away the undo info because usually after
> revert-buffer the undo-info is useless.
In my use pattern, the undo info is rarely useless after revert buffer.
Of course, the revert-buffer operation itself adds undo entries
corresponding to the changes it made.
>> I understand that some people find this idea completely
>> unacceptable, so maybe a good compromise is to just provide a way to
>> tell revert-buffer not to throw away the undo info, and then use it
>> in vc.el.
> And how will you cater for CVS having replaced $Id: ...$ strings and
> similar? How do you know which offsets to apply to the undo info in
> order to compensate for that?
I don't need to: the usual C code takes care of that. All I did was change
insert-file-contents so that it doesn't explicitly throw away the undo info
that is otherwise correctly computed by the underlying primitives.
Stefan