Actually, the "problem" seems to be more about "how to specify a network 
location" such that Leo can open it in a consistent way.

Leo's parsing for @url uses urlparse.urlparse(), and deals with strings 
like I list above - "file:///path/to/file etc.

And I can open File Explorer at the expected place via 
os.startfile("\\\\winlnx\\projects"), for instance

But how to link these two - to use an @url-like scheme to tell Leo that 
some version of that - say "\\winlnx\projects" should be opened like that.

One could concoct a special rule for Leo to use when parsing a URL whose 
'netloc' field looks like this ... but I can well imagine Edward not liking 
that very much.

For now I am going to create a button command so that after selecting the 
name of the path with the cursor, the button runs os.startfile() using that 
text. Let's see how useful that is.

    J^n


On Friday, November 15, 2024 at 9:37:36 AM UTC jkn wrote:

> Hi Viktor
>     update - I think this behaviour is down to Python's os.startfile(path, 
> [...]) function. I am investigating...
>
>     J^n
>
>
> On Friday, November 15, 2024 at 9:06:42 AM UTC [email protected] wrote:
>
>> Hello J^n,
>>
>> Am Fr., 15. Nov. 2024 um 09:41 Uhr schrieb jkn <[email protected]>:
>>
>>> Hi there
>>>     no, that doesn't work - I get a 'file does not exist' error, 
>>> although the path to the 'file' is a bit curious.
>>>
>>> I think it must be down to what 'xdg-open' can use? I am looking into 
>>> how that works...
>>>
>>> ...
>>
>>
>>>
>>> On Friday, November 15, 2024 at 4:17:59 AM UTC [email protected] wrote:
>>>
>>>> but it I have a network location, say '\\winlnx', I get a 'file XXX 
>>>> does not exist' error for all the combinations of 'winlnx' I can create 
>>>> for 
>>>> an @url line.
>>>>
>>>> Does this works?
>>>>
>>>> file://///winlnx/shared_folder
>>>>
>>>>
>>>> https://stackoverflow.com/questions/1369147/linking-a-unc-network-drive-on-an-html-page
>>>>  
>>>>
>>>
>> Maybe this section from the RFC might help you in your investigations:
>>
>>    - https://datatracker.ietf.org/doc/html/rfc8089#appendix-E.3
>>
>> I can't help you more, since I do not have a Windows-based networking 
>> environment anymore ...
>>
>> With kind regards,
>>
>> Viktor
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/leo-editor/6debace9-b565-4f04-9d41-449abb763efbn%40googlegroups.com.

Reply via email to