usinf Linux signals to cause Leo to eg. save files?

33 views
Skip to first unread message

jkn

unread,
Mar 29, 2022, 5:54:52 PM3/29/22
to leo-editor
A slightly off-the-wall question, perhaps - does Leo use (linux) signals? (I don't know much about signals in Windows).

Use case: I use Leo on several machines, editing files on my local network, synchronised via NextCloud. My intention is normally to only have one machine editing a file at any one time; however it doesn't always work like that.

So I might be in the state that I have a leo file being edited (and changes pending) on one machine, when I am on another machine and want to edit the same file.

I was thinking that causing a signal to be sent to Leo on the first machine - "save all files", or "save all files and exit" - might be helpful.

I can well believe there are better approaches, happy to hear about them ;-)

Cheers, J^n

Edward K. Ream

unread,
Mar 30, 2022, 10:28:27 AM3/30/22
to leo-editor
On Tue, Mar 29, 2022 at 4:54 PM jkn <jkn...@nicorp.f9.co.uk> wrote:
A slightly off-the-wall question, perhaps - does Leo use (linux) signals?

No. That would introduce a complex platform dependency.  Let's not go there.

Edward

tbp1...@gmail.com

unread,
Mar 30, 2022, 11:39:37 AM3/30/22
to leo-editor
It ought to be possible to extend leoserver to help with this.  As things stand, you can run a Leo GUI session and a VSCode session at the same time (I've only done it on the same machine but that's not a fundamental problem) and you could use the leoserver instance to do signalling or updating.

Christophe Vermeulen

unread,
Mar 30, 2022, 11:11:40 PM3/30/22
to leo-editor
Agree signals are definitely not the way. I would also avoid a complex integration with any "version control system" into leo.
BUT that could be an argument to consider using SQLite concepts in leo, because there are mechanisms there with transactions etc that could be useful.

jkn

unread,
Mar 31, 2022, 3:09:27 AM3/31/22
to leo-editor
On Wednesday, March 30, 2022 at 4:39:37 PM UTC+1 tbp1...@gmail.com wrote:
It ought to be possible to extend leoserver to help with this.  As things stand, you can run a Leo GUI session and a VSCode session at the same time (I've only done it on the same machine but that's not a fundamental problem) and you could use the leoserver instance to do signalling or updating.


Yes, I slightly wondered about leoserver for this. I haven't yet tried leoserver properly, I ought to do that sometime...
Reply all
Reply to author
Forward
0 new messages