On Saturday, March 12, 2022 at 1:25:05 AM UTC-5 Félix wrote:

> > That is, we want the desktop version of Leo to be the "client".
> Oh! I get it now! - (I thought Thomas was thinking about writing a 
> Leo-dumb-terminal client (à la leointeg) in python  with Qt5/Qt6/tcl-tk or 
> some other gui framework)
>
> Throwing ideas here:
>
> 1- i like the idea of openFileViaServer(host_address, file_path) , there 
> also could be a connectToServer(host_address) which might just connect and 
> present the currently opened files on the server as opened files in the leo 
> "Client"... as if opened with "openFileViaServer", in that new 
> 'remote-server-side-based' mode.
>

I'm sure we'd need a connect_to_server() method;  I see it as needed to 
make to openViaServer() and saveViaServer() work, not as top-level desire.
 

> 2-Like Thomas stated, the files operations have to be intercepted. for 
> example, a save command needs to be intercepted and instead sent as a 
> sequence of two server commands : send-outline-to-server and save-outline. 
> (those methods names are not definitive and just brainstorming here) 
> Another example, the server detects a file change (either derived external 
> file or the leo file itself), so it send the alert-websocket-package to ask 
> the user dialog: 'external file changed, reload?' if so, the client sends 
> it's accepting packet and the server sends back a new model of the 
> outline... 
>

I wouldn't think of the file operations needing to be intercepted, 
exactly.  There are two possibilities:

1) The commander will know what to do about saving/reopening because it 
will know the original network address of the outline. The commander 
already knows about a file's path, so this would be a minor extension.

2) The user should be able to optionally save an outline to the computer in 
use.  There are several reasons this would be a good idea, e.g., the host 
has shut down or gone to sleep, or lost the network connection;  the user 
wants to travel and needs the outline on to be the current machine; etc.

>
> in conclusion, the server needs only, as a preliminary estimate, two new 
> methods: copy_root and paste_root_as_clone to replace the whole of it's 
> outline. Some kind of whole outline + body transfer method instead of the 
> existing 'partial' transfer methods like regular copy and paste outline.
>

I think the clone aspect is good thinking.  For example, my zettelkasten 
system relies on the gnxs for its internal links and relationships.  If 
they were to change, the whole knowledge base would get wrecked.  There are 
probably other cases where the gnxs need to be preserved.

It seems to me that almost everything we need already exists except for the 
actual  acquire-from-the-leoserver. part.
 

> other methods such as open_outline(path), save to file,  etc..  are all 
> already in place in the server. I'll write those methods this week as I 
> finish the server modifications needed for the nav panel which is almost 
> complete.
>

Great! As we move forward, let's try to keep in mind that simplicity is 
good.  My maxim is to start out as simple as possible because because 
things will always get more complicated later.

>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/813de672-a6de-4897-864d-5e90eebdbe38n%40googlegroups.com.

Reply via email to