emacs-devel
[Top][All Lists]
Advanced

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

Re: undo bug?


From: Stefan Monnier
Subject: Re: undo bug?
Date: Thu, 03 Apr 2008 09:55:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Yes, that's indeed what I had understood from your earlier message and
>> what I was responding to.  You're remove the undo boundaries (i.e. the
>> nil entries) and replace them by point-record entries.  That would work
>> fine, except that there are packages out there that look for the
>> nil entries.

> Too bad, indeed.  Are they looking out just for entries they created
> themselves?

>>> Sometimes.  For example I use the patch below to handle the (pretty
>>> annoying) problem that when I redo an earlier insertion `point' ends up
>>> _before_ the inserted text (my `undo' binds `undo-is-redo' to `equiv'
>>> when calling `undo-more').
>> 
>> Have you tried to analyze the source of the problem?  Maybe there are
>> cases where we incorrectly decide not to put a point-record even tho it
>> is needed.

> I think we should enclose every undoable character-modifiying buffer
> change by a `record-point' before and a `record-point' after it.  An
> `undo' would reestablish the position recorded before, a `redo' the
> position recorded after the change.  This way we would handle all
> flavors of inserting text before/after `point' as well as undoing and
> redoing.

The record-point after it wouldn't make anny difference, would it?
Hmm... unless undoing a `record-point' would forcefully add another
record-point entry i nthe undo-list... I guess that might work.

Still, I'm wondering what will be the effect of such a thing on the
length of the undo-list.  It's a pretty minor issue, as far as I can
tell, so it had better not have any noticeable downside.


        Stefan




reply via email to

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