Loading outline files at start-up

54 views
Skip to first unread message

John Kane

unread,
Dec 8, 2019, 3:54:36 PM12/8/19
to leo-editor
A hopefully simple question from a LEO neophyte/incompetent.
I normally use Loo for simple notes and as a place to hold bits of quoted text in outline format.
I would like to set up Leo to load 2 or 3 outline files on start–up.
I understand that i can do this in a ~/.leo/leo.session file but so far I have mucked it up. Can someone point me to an example? I think the problem is that I do not know how to specify a node.

vitalije

unread,
Dec 9, 2019, 2:38:26 AM12/9/19
to leo-editor
If you start Leo with one or more file names then it will open only those files you provided. However, if you start Leo without giving any file it will open the files that were open last time it was closed i.e. files listed in ~/.leo/leo.session. So, you have two options:
  1. provide list of file names you wish to open at startup, or
  2. start Leo without file names and then open outlines you wish to be open on next start and close Leo
HTH Vitalije

PS: you can also press Alt-x and then type session-restore ENTER and Leo will immediately load last saved session

John Kane

unread,
Dec 9, 2019, 10:29:34 AM12/9/19
to leo-e...@googlegroups.com
I, clearly am missing something. What I just tried.
Linux Ubuntu 18.04
I have a file ~/.leo/leo.session. It is empty at the moment.
Load Leo from terminal:
setting leoID from os.getenv('USER'): 'john' Leo 5.8.1-b2 devel, build
20190213233241, Wed Feb 13 23:32:41 PST 2019
workbook.leo automatically loads.
Cpen ~/leodocs/Quotes.leo
Add one item & save
Quit Leo
Check ~/.leo.session—empty
Tried
Alt-X session-restore
Terminal message: Please select an "@session" node

What am missing?
> --
> 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 leo-editor+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/aea406c0-abc5-4e44-bef7-7bca15042b6c%40googlegroups.com.



--
John Kane
Kingston ON Canada

jkn

unread,
Dec 10, 2019, 3:28:34 AM12/10/19
to leo-editor
> To unsubscribe from this group and stop receiving emails from it, send an email to leo-e...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/aea406c0-abc5-4e44-bef7-7bca15042b6c%40googlegroups.com.



--
John Kane
Kingston ON Canada

Don't you have to start Leo with --session-restore, for the session file to be loaded? And possibly --session-save, for your sessions to be saved when you exit Leo?

FWIW below is my ~/.leo/leo.session. The name of one file slightly elided with X's, but you get the idea. I have three files open in this session...

$ more ~/.leo/leo.session                                                                                                                                                                
["/home/jkn/ownCloud/@leo/jknprojects.leo#Diary:10", "/home/jkn/ownCloud/@leo/xxx-xxxxx.leo#Daily Links:0", "/home/jkn/ownCloud/@leo/projects.leo#@settings:0"]

vitalije

unread,
Dec 11, 2019, 4:17:55 AM12/11/19
to leo-editor
Your Leo version is too old. In older versions of Leo, it was necessary to add --session-save and --session-restore to your command line for starting Leo. In the current version those two flags are deprecated and automatically applied if you start Leo without filename. 
Vitalije
> To unsubscribe from this group and stop receiving emails from it, send an email to leo-e...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages