GNU bug report logs -
#16411
undo-only bugs
Previous Next
Full log
Message #32 received at 16411 <at> debbugs.gnu.org (full text, mbox):
> Where:
> • delta, beg, end are as documented.
> • undo-redo is a new function that copies undone-element, applies
> undo-delta, then calls primitive-undo on it.
> • undone-element is the undone element of buffer-undo-list.
> • undo-delta is (position . offset) indicating how undo-redo should
> modify a copy of undone-element in order to carry out the redo.
> When executing undo-only:
> • Assume pending-undo-list can be lazily computed
> • Let undo-skip-set be an empty set of undo elements to skip
> • Iterate over pending-undo-list until prefix-arg undos complete:
> • If the element is in undo-skip-set:
> • Remove it from undo-skip-set
> • Continue loop
> • If the element is of the form for a redo element:
> • Insert its undone-element in the undo-skip-set
> • Else undo the element
In which way would this help fixing bug 2 (I thought we had already
understood how to fix bug 2, BTW)?
More problematic: the step "Insert its undone-element in the
undo-skip-set" means that we skip this "redo" element, which means that
all the subsequent elements (until the matching undone-element) may have
incorrect buffer positions.
Luckily, you probably won't bump into any problem because all these
intermediate elements will themselves be redo elements or be in
undo-skip-set. But it's still dangerous and wasteful (why not skip all
these elements in one swoop as we currently do with undo-equiv-table).
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.