On Monday, June 23, 2025 at 10:30:14 AM UTC-5 Edward K. Ream wrote:

The original script always *moves* c.p (the presently selected node). But 
this might be a dubious choice if c.p.parent() *isn't* the 'Next Actions' 
node. 


We can sidestep this case with another @button node:

Headline: @button next-task @key=f2

Body node:

next_actions = g.findNodeAnywhere(c, 'Next Actions')
if next_actions:
    next_action = next_actions.firstChild()
    if next_action:
        c.selectPosition(next_action)
        c.redraw()
    else:
        g.es_print('No next action')
else:
    g.es_print('"Next Actions" node not found')

In other words: F2 finds the next action. F1 archives it. This keeps the 
workflow simple.

And perhaps the F1 script should do nothing if c.p isn't a child of the 
'Next Actions' node. Your choice.

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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/254c8147-309d-41ca-a7da-75dc58f552c8n%40googlegroups.com.

Reply via email to