Subject: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block

From: [email-masked] (Phillip Lord)
Date: Tue, 07 Jun 2016 12:20:27 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked] (Phillip Lord)
>> Cc: [email-masked],  [email-masked],  [email-masked]
>> Date: Mon, 06 Jun 2016 16:38:54 +0100
>> 
>> > Can you summarize its effect?  It doesn't disable undo in recursive
>> > editing, does it?
>> 
>> No. It limits the addition of undo-boundaries to those buffers that have
>> changed in at the same level of recursion. So, for example, undo will
>> function in mini-buffer during completing-read, but changes in the
>> mini-buffer will not result in the addition of undo-boundaries to
>> buffers that changed during the command that lead to the
>> completing-read.
>
> I guess I'm still confused a bit, because now I'm not sure what
> difference does the change make.  Does it record each change only
> once, where previously we could record it several times?  If not, what
> does the above-mentioned limitation achieve, in terms of user-visible
> effects?

Hopefully, in most cases no user-visible effects, but it fixes the
original bug report.

It happens like this:

call some command
command changes local buffer
command asks for more information from minibuffer with recursive edit
change in the minibuffer forces undo-boundary into local buffer

So, you get an undo-boundary where you did not expect.

With this change:

call some command
command changes local buffer
command asks for more information
changes in minibuffer force undo-boundary only in mini-buffer

Phil