On 1/6/2014 11:14 AM, Offray Vladimir Luna Cárdenas wrote:
Hi,


El 06/01/14 05:23, Fidel N escribió:
I would like to say something about the @ignore node:
I also use those in my scripts, and also want the same, for it to ignore all its
subtree.

Dont you think this should be a default for Leo? @ignore nodes that dont appear
on scripts or anything? Nodes and subtrees which are totally ignored? :)


I think that having @ignore nodes would be useful as a general case. But I don't know who this can be used in particular intended scripts, like the one I describe, so I think that knowing the internals of "do nothing with the children" would be helpful, even if there is not a general directive for that.

I think the following could be a general pattern -- assuming you're handling the nodes in a loop:

heads = [parent.h.split(' ',1) for parent in pos.self_and_parents()]# get a list of the first words in parent headlines
if '@ignore' in heads:# check if @ignore is in the list
    continue # move on to the next iteration
             # of the loop, i.e. the next value of pos

Hope this helps!

-->Jake
Would be nice to have people sharing their trees and @button scripts. The advantage with @buttons is that are explicit about "being there", the problem is that they pollute the interface. Being Leo a general but deeply customizable tool having case of use for several communities would be a way to spread the word about this hidden jewel of computing beyond the frontiers of this small, geeky and nice community :-)

Cheers,

Offray


--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to