Subject: bug#23906: 25.0.95; Undo boundary after process output is not consistent

From: Stefan Monnier <[email-masked]>
Date: Tue, 12 Jul 2016 13:03:41 -0400

> We could also add specific support for removing the last undo, which you
> could do iff point is immediately after $@.

I don't understand enough of Markus's situation to have
a definite opinion.
But I can see several options:
1- Stop worrying about the occasional presence of extra undo entries and
   just let the user hit undo an extra time when that happens.
   This won't work if undo is used semantically (e.g. if a partial undo
   results in an inconsistent state).
2- Refine the timer-based undo-boundaries along the lines of what you
   had earlier: only add a timer-based boundary if the last undo chunk
   is too long (same for undo-boundaries added in non-current buffers).
   It would still occasionally add "unwanted" boundaries, but only when
   not doing so would result in too large an undo list.
3- Have Ediprolog use the same trick used in Viper where we wipe out
   intermediate boundaries after the fact.
4- Add the kind of "do it manually" option you had added earlier, such
   that Ediprolog could request that Emacs refrain from auto-adding any
   undo-boundaries in its buffer.

My favorite is 1 if applicable, then 3, then 4, then 2.

        Stefan