On 12/2/20 11:13 AM, Scott Kostyshak wrote:
On Wed, Dec 02, 2020 at 10:56:16AM -0500, Richard Kimberly Heck wrote:
On 12/2/20 10:46 AM, Scott Kostyshak wrote:
I just remembered this feature exists and it is fun to test it. I have a
few questions/comments:
1. After I exit my text editor, should LyX detect that the process
exited and automatically reload and unlock the inset in LyX?
Currently I need to manually go to "End Editing Externally".
I don't know any way to do this automatically. Probably there is one, but
inter-process stuff is not something I really understand.
Fair enough. I guess ideally it would behave as follows:
1. On any file change (e.g., save from the external editor), LyX would
update the contents (but does not unlock the chunk).
2. When the process exits, LyX updates the contents and unlocks the
chunk.
For (1) I suppose we would need to use our FileMonitor class. For (2) it
seems it should be easy to check when a process exits. That said, if I
claim this is easy I should be willing to look into it and I'm not
volunteering :)
There is still a corner case to deal with: the user might close the file
in the editor, but not exit the editor. (2) above would not pick this
up. I guess to handle this case we would need to use whatever Qt
abstraction tells us if a file is opened by a process.
Yes, I think this is the case I had in mind that requires manual
unlocking. For the other case, I had in mind some version where you open
the file in one editor, then somehow open it again in another one and
close the original. Then I wouldn't want to unlock. But maybe that's
also a weird case.
Riki
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel