On Mon, 27 May 2013 09:19:00 -0700 (PDT)
Fidel Pérez <[email protected]> wrote:

> Moreover, support for session tracking and restoring becomes an instant 
> addition since just by oppening all the @path leo nodes under a "session" 
> node we can restore our session!

There was a thread about saving sessions some time ago.  Here's a
script from that thread which adds a @script node to your outline which
reloads the other outlines currently loaded when this outline is next
loaded.

tablist = g.findNodeAnywhere(c, '@script load tabs')
if not tablist:
    from leo.core.leoNodes import vnode
    v = vnode(c)
    v.h = '@script load tabs'
    v._linkAsNthChild(c.hiddenRootNode,
         len(c.hiddenRootNode.children))
tablist = g.findNodeAnywhere(c, '@script load tabs')
assert tablist
import time
b = ["# Generated %s\n"%time.strftime('%c')]
for oc in g.app.commanders():
    b.append("g.openWithFileName('%s', c)" % oc.fileName())
b.append("c.frame.bringToFront()")
b.append("c.setLog()")
tablist.b = '\n'.join(b)

-- 
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?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to