On Wed, Nov 5, 2008 at 5:15 PM, Randy Kramer <[EMAIL PROTECTED]> wrote:

> Don't know if Ville's thought includes this, but what would make search
> work well for me is to have various features to find a node or group of
> nodes, optionally including the headlines that satisfied various search
> criteria.

Should be easy, once you define the query language

Simple case:

Q; "hello" in h and "stuff" in b

just inject this to list comp:

 [(node)  for (node,h,b) in nodes_iter if $Q]

Advanced:

Q: "hello" in h and c.b("stuff") and c.h("childhead")

=> node for (node, h,b,c) in iter_nodes_with_child_scanner if $Q

Where c.h runs any_child_match_head(node, "childhead")

Implementation is quite trivial.(just run eval and present the hits).
I might add this to my qt quicksearch plugin if I get bored ;-)

Is this what you wanted?

-- 
Ville M. Vainio
http://tinyurl.com/vainio

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to