On Friday, April 30, 2021 at 6:54:17 PM UTC-4 Edward K. Ream wrote:

> On Fri, Apr 30, 2021 at 3:26 PM [email protected] <[email protected]> 
> wrote:
>
>> *g.fullPath* is a really good method. 
>
>
> If you don't care whether there is an @<file node> in p or p's ancestors, 
> you could do something like this:
>
> aList = g.get_directives_dict_list(p)
> path = c.scanAtPathDirectives(aList)
>
 

> c.scanAtPathDirective handles many details like expanding user expressions 
> and "~". This *might* be simpler than your script.
>

Actually, g.scanAllAtPathDirectives(c, p) might be the best of all the 
variations for this usage. 

When I replaced that part of my code with direc = g.scanAllAtPathDirectives(c, 
p),  
I got the right behavior for all my test cases.  They don't include and 
{..} expressions, but those get expanded by the method, so they ought to be 
OK.

None of this used your new ekr-fullPath branch, though.  

-- 
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/7d4fd21e-e508-41ed-a61e-cade75df69fen%40googlegroups.com.

Reply via email to