Comments on "Edit externally" feature

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Dec 6 20:35:47 UTC 2020


Le 06/12/2020 à 19:40, Richard Kimberly Heck a écrit :
>> For example, suppose I do:
>>
>> 1. write "abc" outside an inset (just to have something to undo *to*).
>> 2. edit an inset externally.
>> 3. without ending the external edit, do "undo".
>> 4. now go to the text editor that opened after (2) and make changes and
>>     save and exit.
>>
>> The current result, I think, is that the external edits will be lost.
>> I think the current behavior is reasonable, since I don't know what I
>> would expect. But I'm still curious what others think.
>>
>> Perhaps a warning would be appropriate?
>>
>> Similarly, if I edit an inset externally, and close the buffer, should 
>> we give an error like "please end your external edits before closing" 
>> or something like that?
> 
> I'm pretty clueless about undo. JMarc, can you tell me what to do here?

I'm pretty clueless about external edits. To me, the change is done at 
point 4. Is that right?

In this case, the abc undo element will be acted on at 3 and the 
External edit thing will have its undo recoded at 4;

Note however that I have no idea of how undo is handled in external 
edit. Where should have look to find such code?

To me, undo should be recorded at the places where the LyX document is 
modified.

JMarc



More information about the lyx-devel mailing list