> My question is can I make the link in the relative way?
The following works:
@url 'file:./../doc/leoDocs.leo#Users Guide-->Basics-->Customizing Leo'
For reference, see the code in g.handleUrlInUrlNode. There is a
comment which says:
Most browsers should handle the following urls:
ftp://ftp.uu.net/public/whatever.
http://localhost/MySiteUnderDevelopment/index.html
file://home/me/todolist.html
I'm not sure how reliable that comment is :-)
Edward
> Is there a way to make
>
> file://<CURRENT_PATH>/../abc.pdf
>
> so that Leo knows the CURRENT_PATH to fill it up to open the abc.pdf
> file?
Yes. Use the {{exp}} form. Within @path and @<file> paths, {{exp}}
gets evaluated with the following symbols known: c, g, p, os and sys.
Example:
@file {{os.curdir}}/../abc.pdf
Not sure whether this works with @url.
This isn't documented anywhere at present. It's on the list to add before rc1.
Edward
> there should be a way to run os.path.abspath(os.curdir) to check if it works with @url.
os is defined in {{exp}} so the following should work:
{{os.path.abspath(os.curdir)}}
Edward
> Is there a way to make
>
> file://<CURRENT_PATH>/../abc.pdf
>
> so that Leo knows the CURRENT_PATH to fill it up to open the abc.pdf
> file?
Yes. Use the {{exp}} form. Within @path and @<file> paths, {{exp}}
gets evaluated with the following symbols known: c, g, p, os and sys.
Example:
@file {{os.curdir}}/../abc.pdf
Not sure whether this works with @url.
I just added this to the documentation. See LeoDocs.leo, and search for "{{"
Edward