Request to drop undo/redo atomic fusion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
leo-editor |
Confirmed
|
Wishlist
|
Edward K. Ream |
Bug Description
The conflation of changes separate in time can result in reodering your changes such that redoing everything may not leave you with the most recent printable character that you typed.
Since conflation occurs with "Undo Granularity" set to both "line" and "word", this is a problem for both. My test procedure below demonstrates the problem for "word" mode because "word" mode is easier to understand, and Emacs implements undo/redo in a way that is very, very close to "word" mode. That is, quoting the Emacs documentation: "Consecutive character insertion commands are usually grouped together into a single undo record, to make undoing less tedious." But Emacs does NOT conflate changes separate in time, and Emacs ALWAYS restores the last printable character you typed when it undoes the last undo on the undo/redo stack.
Conflation is a clever idea and is probably helpful sometimes, but because it requires violating a very important user expectation (i.e., The last character typed is the at the end of the "redo" stack.), conflation should NOT be done.
Test procedure:
Set "Undo Granularity" to "word" in your myLeoSettings.leo file.
Create a new Leo-Editor file by specifying a non-existent file on the command line that starts Leo-Editor.
Example:
leomy sel1.leo
Leo-Editor comes up with focus in the body of the only node in the file.
Carefully type the keys specified in quotes (but not the quotes) and the control keystroke combinations (not in quotes):
"heart"
<backspace>
"ings" -- Now you should have "hearings" on the first line of the body.
Ctrl-z -- Now you should have "heart" on the first line of the body.
"some" -- Now you should have "heartsome" on the first line of the body.
Ctrl-z -- Now the body should be blank
Shift-Ctrl-z -- Now you should have "heartsome" on the first line of the body.
Shift-Ctrl-z -- Now you should have "hearings" on the first line of the body.
Shift-Ctrl-z -- This should do nothing. There is no more to undo.
This demonstrates how conflation results in your most recent revision "heartsome" ending up NOT at the end of the redo sequence. That is, redoing all undoes does not always give you your most recent revision.
I believe that I have run into this problem several times while editing--and I was frustrated and confused by it.
Changed in leo-editor: | |
status: | New → Confirmed |
assignee: | nobody → Edward K. Ream (edreamleo) |