bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Phillip Lord
Subject: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block
Date: Sat, 4 Jun 2016 09:51:15 +0100
User-agent: SquirrelMail/1.5.2 [SVN]

On Sat, June 4, 2016 4:05 am, Stefan Monnier wrote:
>>>> Simple let binding would not give quite the same functionality,
>>>> because of the last part -- I also add a boundary to buffers with a
>>>> greater recursive depth; with a let binding, I think these would be
>>>> unbound for commands that lower the recursion depth.
>>> Ah, you mean that the value of undo-auto--undoably-changed-buffers
>>> needs to be propagated "out" when we leave the let-binding.
>> I *think* so -- I'm not entirely sure. It might make no difference.
>>
>
> It makes a difference, since otherwise we may forget that some changes
> were made in a buffer and fail to push a boundary for them.  Not super
> terribly serious, admittedly.

Yes. This is assuming that commands *both* change recursion depth *and*
change a buffer. If they are separate then there will no changes in the
buffer. Since I don't know this to be true, I am assuming that it isn't.

>
>> I use this variable in several different places in two different places
>>  though
>
> Not sure what you mean by "use", and there's clearly some typo about
> "places" which makes the meaning even more murky.

I change the value in this variable at one point (after each
undoable-change) by adding a buffer to it, access at one point (to find
boundaries that need amalgamating) and access it then nil parts of it at
another (to find buffers that need boundaries).

>
>> -- once when we capture the undoable changes (which happens
>> often) and once on at the end of each command.
>
> Right.  I see no need for any changes there.

Really? I have to know the recursion depth at this point

>> I'd have to do this let binding in the command loop?
>>
>
> We'd need this right when we enter a recursive-edit (minibuffer or not),
> so maybe doing it when we enter the command loop would work.
>
>> My current solution seems simpler, even if it does feel like I have
>> created "recursion-level" local variables.
>
> My impression that a let-binding plus a call to
> undo-auto--ensure-boundary will be simpler than your patch.  But it's hard
> to be sure until it's actually implemented.

To be clear, though, to do this I need to augment recursive-edit in C? I
need the let binding to last the life of the recursive edit?

Not being difficult here, just struggling to understand.

Phil







reply via email to

[Prev in Thread] Current Thread [Next in Thread]