[Top][All Lists]

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

Re: An idea: combine-change-calls

From: Johan Bockgård
Subject: Re: An idea: combine-change-calls
Date: Mon, 02 Apr 2018 19:52:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> On Fri, Mar 30, 2018 at 09:04:06 -0400, Stefan Monnier wrote:
>> So, AFAIK it's handled properly by undo itself, undo-tree, and
>> undo-in-region.  Which "package that manipulate buffer-undo-list" are
>> you thinking of?
> Actually, undo-in-region is problematic.  Aside from undo-elt-in-region
> (see above), which is easy to fix, there is undo-adjust-elt "Return
> adjustment of undo element ELT by the undo DELTAS list.", which can't
> adjust the contents of an (apply ...) element, since it doesn't know the
> internal structure of each type of (apply ...).  In this sense, (apply
> ...) is indeed too powerful.

Yes. Another example is ERC (see erc-update-undo-list). Since only the
user's current input at the prompt should be undo-able, undo recording
is enabled for user edits but suppressed for process output (which can
happen concurrently). All positions in buffer-undo-list need to be
adjusted when process output moves the prompt.

reply via email to

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