Started using leo from git -> feedback

61 views
Skip to first unread message

Satheesh Vattekkat

unread,
Dec 15, 2019, 2:26:18 AM12/15/19
to leo-editor
I had some really old version of leo - I believe it was 5.x and was installed 1.5 years ago. I use Leo for collecting thoughts, writing down stuff, structuring a talk etc. Decided to get out of comfort zone and cloned git repo and dailly git pull and started using that. 

  1. This is brilliant. Bunch of my myLeoSettings.leo stuf is no longer needed with dockable panes for body and outline; and it remembers setting too. Plus, the default look is very nice (I am on elementaryos 5.1)
  2. Went to LeoVue site and only one word. *Wow*. Installed the CDN version on laptop as well and put it under local nginx. So good that I actually don't use any of the render stuff that I used to do before.
  3. Now there is a blue bar that shows the opened files - under window title bar, and above menus. I usually have only one file open and this takes away premium vertical space in my laptop - how do I get rid of that? When I had multiple files open, I could right click on one of them and do some "detach" to get it out for that file - but I want this to be permanently hidden. FWIW, I also keep icon-bar always hidden to save space - which seems to be remembered in this version than me having to start leo with such a setting.
Overall awsome stuff - rarely do one get so thrilled to see software so nicely advanced and still true to its core in a short time.

BTW, one greedy need -> I tried various directives like @clean, @auto etc to include another .leo file in my outline. Doesn't work. Any chance of that ever getting implemented? Two usecases I can think of are:
  1. I am trying to convert different people to use Leo and they have their own leo files. We share those over git or shared folder. Having an ability to import also allows individual contribs to larger outlines.
  2. It also helps in keeping the left side outline pane a bit more manageable. On large outlines, there is too much vertical scrolling to keep focus. This can also be solved by giving some option to collapse everything outside current node to one single ellipsis/plus sign as well.
Back to learning new leo  then :)

Edward K. Ream

unread,
Dec 15, 2019, 5:57:04 PM12/15/19
to leo-editor


On Sun, Dec 15, 2019 at 1:26 AM Satheesh Vattekkat <vsb...@gmail.com> wrote:

  1. This is brilliant. Bunch of my myLeoSettings.leo stuff is no longer needed with dockable panes for body and outline; and it remembers setting too. Plus, the default look is very nice
Glad you like it. 
  1. Went to LeoVue site and only one word. *Wow*. Installed the CDN version on laptop as well and put it under local nginx. So good that I actually don't use any of the render stuff that I used to do before.
Excellent.  You are way ahead of me in this area. 
  1. Now there is a blue bar that shows the opened files - under window title bar, and above menus. I usually have only one file open and this takes away premium vertical space in my laptop - how do I get rid of that? When I had multiple files open, I could right click on one of them and do some "detach" to get it out for that file - but I want this to be permanently hidden. FWIW, I also keep icon-bar always hidden to save space - which seems to be remembered in this version than me having to start leo with such a setting.
Iirc, Leo always uses a tabbed interface, to be able to show multiple outlines.
 
Overall awsome stuff - rarely do one get so thrilled to see software so nicely advanced and still true to its core in a short time.

BTW, one greedy need -> I tried various directives like @clean, @auto etc to include another .leo file in my outline. Doesn't work. Any chance of that ever getting implemented?

Little or none.
Two use cases I can think of are:
  1. I am trying to convert different people to use Leo and they have their own leo files. We share those over git or shared folder. Having an ability to import also allows individual contribs to larger outlines.
Rather than sharing .leo files, you can share external files. 
  1. It also helps in keeping the left side outline pane a bit more manageable. On large outlines, there is too much vertical scrolling to keep focus. This can also be solved by giving some option to collapse everything outside current node to one single ellipsis/plus sign as well.
Leo has various options that can force it to collapse nodes when searching or moving or when using arrow keys to traverse the outline.  See the node "Tree Operation" in leoSettings.leo.  My preference is always to collapse as much as possible.

The new "clone find" commands should also help you.  cff (clone-find-flattened) makes clones of found nodes, and collects them as direct children of a new top-level node.  The cffm (clone-find-flattened-marked) does the same with all marked nodes.  So you can gather nodes by marking them and then doing a cffm.

All the clone-find commands gather results in one place, thereby eliminating the need to have lots of suboutlines expanded.
 
Back to learning new leo  then :)

Thanks for your comments.

Edward

vitalije

unread,
Dec 16, 2019, 3:38:50 AM12/16/19
to leo-e...@googlegroups.com

>
>
> BTW, one greedy need -> I tried various directives like @clean, @auto etc
> to include another .leo file in my outline. Doesn't work. Any chance of
> that ever getting implemented? Two usecases I can think of are:
>
>    1. I am trying to convert different people to use Leo and they have
>    their own leo files. We share those over git or shared folder. Having an
>    ability to import also allows individual contribs to larger outlines.
>
>
>

For sharing Leo outlines, I suggest using three commands set-reference-file, update-ref-file and read-ref-file. With the first one 'set-reference-file', you select a shared Leo file. This command will add one top-level node with the headline '---begin-private-area---', and in the body of this node first line will be the file name of shared Leo file. One can also insert such a node manually, without using 'set-reference-file' command. Everything above (or before) this node is the content of the shared Leo outline. The 'update-ref-file' command will save all nodes above/before the top-level node with the headline '---begin-private-area---' in the public/shared Leo file. After 'git pull', one should invoke 'read-ref-file' command. This command will delete all nodes before '---begin-private-area---' node and rebuild this part of the outline from the shared Leo file.


Quite often, I used to forget to invoke 'update-ref-file' before 'git commit'. So, I always add one button node with the headline '@button n-save @key=Ctrl-s', and in the body I put at least the following code:


c.save()
# the following is only to remove unknownAttributes which can be
# automatically regenerated so that they don't polute shared file
for v in c.fileCommands.gnxDict.values():
   
if not hasattr(v, 'unknownAttributes'): continue
   
if tuple(v.u.keys()) in ((), ('icons',)):
       
del v.unknownAttributes
# now we can save the public part of this outline to the shared Leo file
c
.fileCommands.save_ref()
c
.frame.tree.declutter_update = True # signal to regenerate icons on the
next redraw


After reloading Leo, whenever I press Ctrl-s to save the outline, shared
outline is also saved.


HTH Vitalije

Matt Wilkie

unread,
Dec 17, 2019, 4:10:17 PM12/17/19
to leo-editor
For sharing Leo outlines, I suggest using three commands set-reference-file, update-ref-file and read-ref-file.

Very interesting! I guess I wasn't paying attention when it came up before. In the docs there's a bit in the FAQ about this feature (https://leoeditor.com/FAQ.html#how-can-i-customize-settings-for-a-particular-external-file), but it's missing a script. Is this next bit the same thing?

 Quite often, I used to forget to invoke 'update-ref-file' before 'git commit'. So, I always add one button node with the headline '@button n-save @key=Ctrl-s', and in the body I put at least the following code:


c.save()
# the following is only to remove unknownAttributes which can be
# automatically regenerated so that they don't polute shared file
for v in c.fileCommands.gnxDict.values():
   
if not hasattr(v, 'unknownAttributes'): continue
   
if tuple(v.u.keys()) in ((), ('icons',)):
       
del v.unknownAttributes
# now we can save the public part of this outline to the shared Leo file
c
.fileCommands.save_ref()
c
.frame.tree.declutter_update = True # signal to regenerate icons on the
next redraw


After reloading Leo, whenever I press Ctrl-s to save the outline, shared
outline is also saved.


-matt

vitalije

unread,
Dec 18, 2019, 2:39:19 AM12/18/19
to leo-editor


On Tuesday, December 17, 2019 at 10:10:17 PM UTC+1, Matt Wilkie wrote:
For sharing Leo outlines, I suggest using three commands set-reference-file, update-ref-file and read-ref-file.

Very interesting! I guess I wasn't paying attention when it came up before. In the docs there's a bit in the FAQ about this feature (https://leoeditor.com/FAQ.html#how-can-i-customize-settings-for-a-particular-external-file), but it's missing a script. Is this next bit the same thing?

 
Wow, I didn't realize that it got in the FAQ. I think the entry covers two or event three different fa-questions. The first part was just my direct answer on the question about how to share settings. Then follows  my suggestion for sharing outlines in general, and at the end is my recommendation on how to setup web development in Leo. The original post contained an attachment, a mini web project in Leo, which is missing in the FAQ entry.

Vitalije

Matt Wilkie

unread,
Dec 18, 2019, 5:15:34 PM12/18/19
to leo-editor
I created an issue to remember to come back and clarify the docs on this workflow as I think it's an important one.
If someone has gumption present they can do it; I'm pretty slammed these days and not spending much time on Leo ;-)

-matt

Reply all
Reply to author
Forward
0 new messages