On Mon, Jun 26, 2023 at 9:21 AM Thomas Passin <tbp100...@gmail.com> wrote:
The bookmark manager needs to 1) flatten the paths of nested nodes (to > provide labels like "software/python/frameworks") and 2) make each step of > those flattened labels clickable so that a user can navigate to their > node. Gnxs can't provide that capability, whether or not they are called > "new style unls". Pre-change unls, OTOH, are ideal and require almost no > tinkering with to achieve those requirements. If Leo won't support those > capabilities, the the bookmarks manager needs to compute the equivalent, > and the obsoleted Leo methods already do that. So it's easier for me to > use them than to re-create their capability from scratch. > > The zettelkasten machinery runs on gnxs and should be less affected if at > all. But I have a host of nodes that include unl links to other outlines, > and none of those links would work any more. Some supporting commands do > things like getting the unl of a node and copying it to the clipboard. > Maybe those would still work, maybe they wouldn't. I'll have to see. > Thanks for the clarification. All your existing unls should now work. Please test the branch and report any problems. *About the name, p.get_UNL* The more I think about this question, the more tricky it becomes. The PR previously did use the scheme you proposed. But I want p.get_UNL to change so that legacy code will use the *new *unls. In other words, the underlying issue is about compatibility, not names. *New methods* I'll create two new methods for use by plugins such as yours: *p.get_legacy_UNL* will return what g.get_UNL used to return. *p.get_short_legacy_UNL* will return a headline-oriented unl, omitting the file name component (everything up to and including the '#'). *Note: *g.findUNL never did anything useful with the file name! *Better searching* The new g.findGNX searches all open outlines for nodes with the given gnx. * g.findUNL can use the same scheme!* *Summary* p.get_UNL should return gnx-oriented unls so that existing code will automatically use non-breakable gnxs. I'll add p.get_legacy_UNL and p.get_short_legacy_UNL. I'll add expanded searching to g.findUNL, just as in g.findGNX. Please test your plugins. I'll fix any compatibility problems before merging the PR. 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1M7W3J%3DK%3DkPRaBRnmJRUCy_ErLk4CHkLUpDAcVsgNFZQ%40mail.gmail.com.