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

From: Markus Triska <[email-masked]>
Date: Wed, 13 Jul 2016 00:45:12 +0200

Stefan Monnier <[email-masked]> writes:

>     Please note in this case that, as explained above, the output
>     normally is inserted continuously in a loop, but it is possible to
>     break out of the loop with C-g and edit text elsewhere in the
>     buffer, and in that case I still would like the normal undo
>     behaviour for user input.

To clearify this paragraph: Suppose the Prolog query is in progress and
takes a long time. The user presses C-g to quit waiting for process
output (the process continues of course) and continues to edit unrelated
parts of the program, or writes new queries etc. *These* edits are to be
regarded as completely normal edits, with everything as usual.

Only everything that happens in the context of "interaction with the
Prolog process" should always be undone as a single unit, without any
undo boundaries, even if user input happened during the interaction (as
it almast always does, because we ask for the next answer etc.).

However, user pressing C-g to temporarily get out of the Prolog
interaction (you can resume with M-x ediprolog-toplevel RET) is
comparatively unusual: Most ediprolog queries are small self-contained
test cases that quickly yield the desired answer, at least from my
experience. So I do not care that much what happens after C-g: For
example, if the undo "transaction" ends upon C-g, and normal undo
behaviour ensues for the rest of the interaction, that's very OK!

All the best,
Markus