On Wed, Sep 7, 2011 at 6:19 AM, Edward K. Ream <[email protected]> wrote: > On Mon, Aug 8, 2011 at 9:27 AM, Kent Tenney <[email protected]> wrote: >> Howdy, >> >> Is there an easier way to get a node [UNL] than to iterate through parents? > > This discussion is amusing. Almost all such questions can be > researched by doing a few searches. Here, my first thought was be to > discover how UNL's are already computed. Searching for UNL (word > search) I found the following: > > Plugins-->Commands & directives-->@file quickMove.py-->class > quickMoveButton-->computeUNL > > This plugin isn't always enabled, so I looked in Leo's core: > > Code-->Gui base classes-->@file leoFrame.py-->class > leoTree-->leoTree.select & helpers-->selectHelper > > # what UNL.py used to do > c.frame.clearStatusLine() > c.frame.putStatusLine("-->".join(reversed( > [i.h for i in p.self_and_parents()])))
This returns an incorrect UNL if there is a "-->" in the headline. Are there compelling reasons not use standard notation for UNL? leo://myleofile.leo/root node/child node/target slashes in headlines would need escaping, as --> does now. I like the orthogonality of slashes as separators. Thanks, Kent > > Had the helpful comment not been present, I could have found the code > by looking for calls to putStatusLine. > > Edward > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/leo-editor?hl=en. > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
