GNU bug report logs -
#16411
undo-only bugs
Previous Next
Full log
View this message in rfc822 format
>> If anything should be done with it, I think it'd be to *cut* the
>> extra undo/redo pairs.
> No complaint from me. That would change the behavior of ordinary undo
> command,
Yes. And I think that's what we want: as a user, having to wade through
N repetitions of redo/undo is a pain. Those that suffer often from it
probably switched to undo-tree.
The idea of cutting the extra undo-redo pairs follows the following
principle: an undo-redo pair gives you access to 1 past buffer state,
but if the earlier undo elements already made you go through an
identical state, then this undo-redo pair is superfluous.
I'm sure this can be generalized for undo-in-region (where an undo-redo
pair may not bring you exactly to the same state, but still gives you
access to a change you've already seen earlier in the undo list), but
I'm sure you can define it more easily than I.
> which you just said you don't want to change.
So far there was no discussion of changing behavior: only fixing bugs
and changing implementation.
>> I'm not completely convinced that this generator is worthwhile
> Ok, I'll lose it then.
We may want to (re)introduce it later, tho.
>>> I originally set out to do this, but making the weak references
>>> work seemed overly tricky to me. The value stored in
>>> undo-redo-table would need to be non weak with weak references to
>>> undo elements. I supposed this would mean many one element weak
>>> hash tables. That seems dodgy.
>> Hmm... that's a very good point. Worth mentioning in a comment.
> You actually want me to do that? That is: wrap every referenced
> element in a size 1 weak hash table.
God no! I'm saying that I agree with your justification for the design of
undo-redo-table keeping mappings for every undo-element rather than one
per undo group; but that you need to put a comment in the code
explaining why it's done this way.
Stefan
This bug report was last modified 10 years and 361 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.