I'm trying to use undo in a region to undo multiple changes -- but I can only toggle between undoing one change and redoing it.
For example, if I start with:
Here is line 1 with some text.
Line 2 is here.
Line 3 is, naturally enough, after line 2.
I make a change first to line 1, then to line 3:
Here is line 1 with some FIRST-CHANGE text.
Line 2 is here.
Line 3 is, naturally enough, after line 2. SECOND-CHANGE
Then I go back and change line 1 again:
Here is line 1 with some FIRST-CHANGE text. And THIRD CHANGE too!
Line 2 is here.
Line 3 is, naturally enough, after line 2. SECOND-CHANGE
I want to undo all the changes to line 1 but leave the others. So I select a region with just line 1 and do C-/
to undo in region. That just removes the final exclamation point:
Here is line 1 with some FIRST-CHANGE text. And THIRD CHANGE too
Line 2 is here.
Line 3 is, naturally enough, after line 2. SECOND-CHANGE
Okay, I want to keep going. I select line 1 again, do C-/
again, and get the exclamation point back!
If I use regular undo, I can just keep undoing through previous changes.
Is there a way to do the same with a region?
I've tried undo-redo
but that doesn't do what I want.
Is there a way to undo everything in line 1 but keep line 3 as it is?