Apologies for not fully following all of the recent good work here. I meant
to mention this earlier but just wanted to check this 'platform
independent' part.
On my Linux box, I get something in the lower 'status bar' like(*)
unl:///home/jkn/path/to/myfile.leo#node-->subnode-->subnode
but when I run on my windows machine, the same file (shared via NextCloud)
will not be like this, shurely? What happens if I move my .leo file to a
different location? Apologies if I am missing something fundamental...
(*) slightly separate point - right click in that area shows 'copy/CTRL+C
and 'select-all/CTRL+A'. It seems like I have to do CTRL+A followed by
CTRL+C. I'd suggest that if you have no part of the ... gurl? ... selected,
then CTRL+C should implicitly select the whole entity before copying
Sorry if this is muddying the waters...
Jon N
On Wednesday, July 5, 2023 at 12:00:35 PM UTC+1 Edward K. Ream wrote:
> This post explains why PR #3215
> <https://github.com/leo-editor/leo-editor/pull/3215> (gnx-based unls) is
> a milestone in Leo's history.
>
>
> gnx-based unls are a fundamental resource comparable in importance to
> @clean and cff:
>
>
> - Unls won't break if you rename or move a node.
>
> - Leo supports *platform-independent* cross-file unls.
>
> - Creating gnx-based unls is dead easy.
>
>
> Leo now contains significant new resources related to gnx-based unls:
>
>
> *@data unl-path-prefixes* helps resolve unls to different paths on
> different platforms. *Most users need to know only about this setting.*
>
>
> Leo provides two other resources for plugins:
>
>
> *g.parsePathData* parses such @data nodes to a python dict.
>
>
> *g.openUNLFile(c, s)* resolves s (the file part of an unl) to a
> commander, defaulting to c if no resolution is possible. This function
> contains an Easter Egg. It will return c immediately if s specifies the
> active outline.
>
>
> Plugins can monkey-patch g.openUNLFile to gain *complete *control over
> how Leo resolves unls.
>
>
> *Summary*
>
>
> gnx-based unls are a fundamental resource comparable in importance to
> `@clean` and cff. Creating unbreakable cross-file unls is dead easy.
>
>
> Leonistas will likely find creative new uses for unls. For example, a
> script could scan a document, possibly contained in different outlines,
> converting unls to links for markup/reStructuredText.
>
>
> Most users need to know only about the *@data unl-path-prefixes* setting.
> *g.parsePathData* parses such @data nodes to a python dict.
>
>
> Plugins can monkey-patch *g.openUNLFile* to gain complete control over
> how Leo resolves unls.
>
>
> All of your questions and comments are welcome.
>
>
> Edward
>
>
> P.S. Plugins can also alter @data unl-path-prefixes *programmatically *by
> calling *c.config.set*. Like this:
>
>
> c.config.set(kind='data', name='unl-path-prefixes', val=lines)
>
>
> Unit tests for leoGlobals do this using *LeoUnitTest._set_setting*. Take
> a look :-)
>
>
> EKR
>
>
--
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/95912f6e-c907-4b72-9ede-b75e91ef8eb6n%40googlegroups.com.