emacs-devel
[Top][All Lists]
Advanced

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

Re: How can I undo a change from a modification-hook?


From: Clément Pit-Claudel
Subject: Re: How can I undo a change from a modification-hook?
Date: Wed, 26 Apr 2017 15:02:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 2017-04-26 14:43, Stefan Monnier wrote:
>>>>> In the case of PG, I'd suggest you treat such a case as
>>>>> a non-whitespace change.
>>>> But I can't, can I? The damage (the change) is already done at that point,
>>>> and I can't revert it.
>>> But you can "retract" until the beginning of the changed area.
>> No, not if the current subprocess is busy.
> 
> Not sure why it matters: you queue the retraction commands for execution
> when the subprocess is done with its current command(s).

No, that's not something that I can currently do: I can't queue a retraction 
before the processing of that section is complete (because that processing may 
fail, and then there wouldn't be anything left to retract).

Of course, I could rewrite the queuing logic to be more resilient to this kind 
of changes.  But the question is about ways to prevent edits, and I think it's 
more general than this particular example.





reply via email to

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