How did I came across Leo?

274 views
Skip to first unread message

Satish Goda

unread,
Feb 21, 2018, 8:02:47 PM2/21/18
to leo-editor
It has been almost 14 months since I discovered Leo and today I recalled how I found it.

I was searching GitHub for the term "QWidgetAction" and came across its usage in Leo codebase.

And then curiosity killed the cat and I was curious about Leo and read about it and downloaded it as well.

Largo84

unread,
Feb 21, 2018, 11:02:20 PM2/21/18
to leo-editor
I found Leo when I was looking for a replacement for ECCO (anyone remember that program?) I used ECCO for 15 years after it wasn't supported anymore and the core group of diehard users finally lost hope the program owners would open source the code.

Anyway, I don't remember how long ago that was; at least 10 years ago, as I recall. In most respects, Leo is a *major* improvement over ECCO and I don't regret the switch. However, the one thing I still miss about ECCO and wish there was a good Leo integration is the calendar. ECCO could print almost any kind of calendar, in practically any format on any size. I really miss that. There's no other PIM on the market that I know of that has that kind of flexibility.

Perhaps other Leo users figured out how to integrate their calendar(s) with Leo; I haven't and would love to know how (if it's possible).

Rob...

Chris George

unread,
Feb 22, 2018, 9:07:43 AM2/22/18
to leo-e...@googlegroups.com
I found Leo when I was looking for an outliner that supported clones,
ran on Linux, and wasn't a website. I live on a farmlet on the edge of
the world and our internet has always sucked.

I took Leo up in 2007. And if there is one thing I have learned in the
interval it is that with Leo, anything is possible.

Python has a pretty robust calendar module.
https://www.w3resource.com/python/module/calendar/

Calendar events can be formatted using csv and imported into google
calendar, which puts those events into email, and onto phones and
tablets for action.

Now, I am not a programmer. I took me over a decade to even write my
first script in Leo (last week!)

Someone (he gets a lot of work here at our place) should write a plugin. :-)

Chris
> --
> 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 post to this group, send email to leo-e...@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

Terry Brown

unread,
Feb 22, 2018, 9:27:45 AM2/22/18
to leo-e...@googlegroups.com
I think I was using Freemind before Leo, although I'd spent a long time
using the console based outliner hnb, which apparently has been
resurrected as tines https://github.com/larrykollar/tines

Cheers -Terry

Zoom.Quiet

unread,
Feb 22, 2018, 9:39:54 AM2/22/18
to leo-e...@googlegroups.com
On Thu, Feb 22, 2018 at 10:27 PM, Terry Brown <terry...@gmail.com> wrote:
>
> I think I was using Freemind before Leo, although I'd spent a long time

WoW .. in fact,
there really some guys base Leo record notes,
and translate into Freemind xml for export maindmapping html.

> using the console based outliner hnb, which apparently has been
> resurrected as tines https://github.com/larrykollar/tines
>
> Cheers -Terry
>
> --
> 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 post to this group, send email to leo-e...@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.




--
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

Kent Tenney

unread,
Feb 22, 2018, 9:56:41 AM2/22/18
to leo-editor
I think I discovered Leo as a result of a fleeting interest
in literate programming. Don't recall the date, but it was
before Leo was ported from C++ to Python.

When I learned that Edward lived across town, kitty-corner
from a high school sweetheart, I was SOLD!

:-]

On Thu, Feb 22, 2018 at 8:39 AM, Zoom.Quiet <zoom....@gmail.com> wrote:
On Thu, Feb 22, 2018 at 10:27 PM, Terry Brown <terry...@gmail.com> wrote:
>
> I think I was using Freemind before Leo, although I'd spent a long time

WoW .. in fact,
there really some guys base Leo record notes,
and translate into Freemind xml for export maindmapping html.

> using the console based outliner hnb, which apparently has been
> resurrected as tines https://github.com/larrykollar/tines
>
> Cheers -Terry
>
> --
> 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+unsubscribe@googlegroups.com.

> To post to this group, send email to leo-e...@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.




--
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!
--
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+unsubscribe@googlegroups.com.

Offray Vladimir Luna Cárdenas

unread,
Feb 23, 2018, 12:35:10 PM2/23/18
to leo-e...@googlegroups.com

Hi,

I came about Leo because I was interested in Learning Python and some forum said that Leo, not Zope, was a superb showcase for this language and then I found that it supported a form of literate programming, which I was already interesting into. I started to use it almost exclusively for writing, not for programming, from note keeping to even draft of my thesis, since 2005, when I found Leo, to 2015 and then I found Pharo and Roassal and the idea of software as a graph[1] and I decided to create my own outliner with ideas of Leo, Jupyter, Smalltalk and others. These days I still use Leo for quick notes and probably I would use it again to deconstruct some large script or textual program.  So, my path was Python -> Zope -> Leo -> Outlining for Literate Programming -> Writing -> Pharo, Roassal -> Reproducible research and data storytelling and visualization -> Grafoscopio. Of course, some parts were traversed in parallel and I still try to combine ideas and communities from several places.

[1] https://vimeo.com/94724841

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 leo-editor+...@googlegroups.com.

Edward K. Ream

unread,
Feb 23, 2018, 12:39:20 PM2/23/18
to leo-editor
On Fri, Feb 23, 2018 at 11:35 AM, Offray Vladimir Luna Cárdenas <off...@riseup.net> wrote:

​> ​
So, my path was Python -> Zope -> Leo -> Outlining for Literate Programming -> Writing -> Pharo, Roassal -> Reproducible research and data storytelling and visualization -> Grafoscopio.

​It's been great fun reading these comments.  I may create a new section in the docs for them.

Edward

Matt Wilkie

unread,
Feb 27, 2018, 4:10:52 PM2/27/18
to leo-editor
It has been almost 14 months since I discovered Leo and today I recalled how I found it.
 
Thanks for this thread. I've been trying to recall my own path of discovery. No concrete memory has emerged, but it was somewhere in the intersection of being dissatisfied with wiki notes and mind/concept mapping, starting to learn python, and a multi-decade quest for the perfect text editor (1999-2004, 2010). Gmail says I subscribed to the Leo mailing list in 2009 with my first concrete contribution in August -- a Windows install recipe. Huh. I'm still doing that now!

In spite of the lengthy time since discovering Leo and bringing it into my permanent toolkit, it's still not front and centre for much of my activity. Onenote desktop is my primary writing and organizing tool (the web app is ...meh) and Pyzo the first stop for exploratory python. Much as I love text I'm still a strong graphic creature. My dream writing platform is all of the best parts of rich text & media editing fused with Leo's node management and scripting. Bonus points if it's webby lets me punt Wordpress and all the other web content management things I've tried and discarded (jekyll, acrylamid, drupal, mindtouch, deki-wiki, twiki).

There is substantive aroma of my dream in the air right now, which is very exciting. :)

cheers,

matt

Edward K. Ream

unread,
Mar 1, 2018, 11:35:43 AM3/1/18
to leo-editor
On Tue, Feb 27, 2018 at 3:10 PM, Matt Wilkie <map...@gmail.com> wrote:

Much as I love text I'm still a strong graphic creature. My dream writing platform is all of the best parts of rich text & media editing fused with Leo's node management and scripting. Bonus points if it's webby lets me punt Wordpress and all the other web content management things I've tried and discarded (jekyll, acrylamid, drupal, mindtouch, deki-wiki, twiki).

There is substantive aroma of my dream in the air right now, which is very exciting. :)

​Maybe I should appoint you the "dream runner" for Leo ;-) It's both exciting and bewildering to me.

Edward

David Szent-Györgyi

unread,
Mar 3, 2018, 12:39:42 AM3/3/18
to leo-e...@googlegroups.com
I employed Leo for an oddball use case, which it addressed beautifully. 

How long ago did this start, perhaps 2005?

The job that I held then required that, without help from work infrastructure or from colleagues, I write tools for diagnosing and repairing problems with installations of a complicated software package and the many libraries it used. The package ran under Microsoft Windows, I had to ship the tools easily via e-mail, and they had to run easily, without requiring installation or uninstallation. 

In those less paranoid days, the flexible packaging method was a Windows Script Host file, in which Microsoft allowed scripts in the supported language of one's choice to call modules written in any other supported scripting language. Microsoft allowed the storage of multiple modules and data files in the WSH file; the format Microsoft employed for this was XML. 

The conventional approach would have been to use a commercial XML editor to build the file. XML editors were specialty products sold for huge sums to industrial combines. Commercial products were aimed at Big Enterprise Publishing with Big Enterprise Money, not at software development by a solitary programmer with a garden-variety PC and no budget. I needed to build my own editor, or I needed to write tools to pre-process each of my tools' source code and the source code for the library routines, then assemble the preprocessed code into the multiple WSFs. This would have been multiple tools, at least a preprocessor akin to the Unix "m4" command and an executable akin to Make, and those would need maintenance. I had no budget for buying software. What to use instead?  

Leo offered me a targeted IDE for Python with the ability to manage all my source code. It offered the PIM I needed to organize my development effort. 

I had to write scripts in Visual Basic Scripting Edition (VBS), because Microsoft deployed it everywhere, and because a lot of modules I could use were written in VBScript. With that in mind, I added support for VBScript to Leo's syntax highlighting. Leo's architecture made that easy. 

Each of the multiple tools that I would write would end up in a WSF of its own. Using Leo's @file commands for the individual WSFs would steer me to use a preprocessor-plus-compiler-plus-Make toolkit, so instead I reached for Leo's heritage in Literate Programming: I used Leo's now-deprecated @root command instead of the @file family of commands, and forced Leo to Tangle the section of the outline required to generate a required WSF.

That allowed me to keep a straightforward correspondence between the section of the Leo file for each tool and the WSF for the tool itself: once I told Leo to Tangle the necessary section of its outline, I knew the resulting WSFs were correctly formatted and included exactly what I required, and nothing more. 

Because the the representation of a module within a WSF was XML, the source code for that module had to be encoded, or it had to be packaged specially so that the Windows Script Host software would handle it in its original form. I did not want to do the filtering, I wanted the outline to contain the unchanged file in a Leo node in a form that would guarantee its correct representation in the WSF. I was able to figure out how to surround the source code's node in the Leo outline in a few extra nodes that would allow me to use the source code exactly as it came. That made it painless for me to add new modules to to my library. 

Edward K. Ream

unread,
Mar 3, 2018, 2:39:02 AM3/3/18
to leo-editor
On Fri, Feb 23, 2018 at 11:35 AM, Offray Vladimir Luna Cárdenas <off...@riseup.net> wrote:

I came about Leo because I was interested in Learning Python and some forum said that Leo, not Zope, was a superb showcase for this language and then I found that it supported a form of literate programming, which I was already interesting into.


​Thanks for this.  They are now in LeoDocs.leo and will appear on Leo's web site when it gets updated.

Edward

Edward K. Ream

unread,
Mar 3, 2018, 2:39:59 AM3/3/18
to leo-editor
On Fri, Mar 2, 2018 at 11:39 PM, David Szent-Györgyi <das...@gmail.com> wrote:
I employed Leo for an oddball use case, which it addressed beautifully. 

Quite an interesting project.  Your post is now in LeoDocs.leo and will appear on Leo's web site when it gets updated.

Edward
 

David Szent-Györgyi

unread,
Mar 3, 2018, 7:49:21 AM3/3/18
to leo-editor

Let me know if I can clarify that posting.  

I was using commands that were by your standards less easy to use. I was also structuring my Leo outline in a way that risked data loss if I did a Wrong Thing. As such, I did not explain the details of what I'd done. The guideline I followed came from a coworker who had to figure out how to install assortments of demanding expansion cards in computers that did not work unless those cards were installed Just So. My coworker's motto was, "If it's stupid, and it works, it isn't stupid"!

I would like to maintain the utilities that I wrote using Leo all those years ago - at least one of them remains useful. Do we know whether @root and @tangle work in 2018-era Leo?

Edward K. Ream

unread,
Mar 3, 2018, 7:56:48 AM3/3/18
to leo-editor
On Sat, Mar 3, 2018 at 6:49 AM, David Szent-Györgyi <das...@gmail.com> wrote:

​> ​
My coworker's motto was, "If it's stupid, and it works, it isn't stupid"!

​Hehe.  It's an arguable point.​
 
​There is also an argument for cleanups, when possible.​
​ Vitalije is working on collapsing Leo's tree-drawing code as we speak.

​> ​
Do we know whether @root and @tangle work in 2018-era Leo?

​@root and Leo's tangle and untangle commands will remain "forever".  They are, on purpose, no longer documented, but there is nothing whatever to be gained by removing a feature that you and others still use.

Edward

David Szent-Györgyi

unread,
Mar 3, 2018, 8:54:51 AM3/3/18
to leo-editor
On Saturday, March 3, 2018 at 7:56:48 AM UTC-5, Edward K. Ream wrote:
On Sat, Mar 3, 2018 at 6:49 AM, David Szent-Györgyi <das...@gmail.com> wrote:

​> ​
My coworker's motto was, "If it's stupid, and it works, it isn't stupid"!

​Hehe.  It's an arguable point.​
 
​There is also an argument for cleanups, when possible.​
​ Vitalije is working on collapsing Leo's tree-drawing code as we speak.

Cleanup and improvement are worthwhile, given time and energy that I couldn't spare in those days. Now, I have some time to address the matter. 
 
​> ​
Do we know whether @root and @tangle work in 2018-era Leo?

​@root and Leo's tangle and untangle commands will remain "forever".  They are, on purpose, no longer documented, but there is nothing whatever to be gained by removing a feature that you and others still use.

Thank you! 

Matt Wilkie

unread,
Mar 4, 2018, 10:18:25 PM3/4/18
to leo-editor
​@root and Leo's tangle and untangle commands will remain "forever".  They are, on purpose, no longer documented, [...]

I would hope they are documented somewhere though? Perhaps within the code if no place else. I imagine a future self shooting myself in the foot while I spin this unknown thing this way and that wondering what it does. ;-)

matt

Edward K. Ream

unread,
Mar 5, 2018, 4:19:21 AM3/5/18
to leo-editor
On Sun, Mar 4, 2018 at 9:18 PM, Matt Wilkie <map...@gmail.com> wrote:

>>
​ ​
@root and Leo's tangle and untangle commands will remain "forever".
​>>​
They are, on purpose, no longer documented, [...]
 
>
​ ​
I would hope they are documented somewhere though? Perhaps within the code if no place else.

leoPy.leo#Code-->Core classes-->@file leoTangle.py--><< About Tangle and Untangle >>

However, this refers to Chapter 4, which no longer exits.
 
>I imagine a future self...
​​
wondering what it does. ;-)

​There is no reason for you or any dev ever to try to understand this code. Just leave it as it is.

Edward​

Christophe Vermeulen

unread,
Mar 22, 2022, 6:07:43 PM3/22/22
to leo-editor
Well, I came across leo last week, looking for a python IDE that would (potentially)
- run on Windows
- allow to make the resulting python run on a separate computer (same network but different subnet) for security reasons, maybe on Linux.
- ideally, the python script could run with another user account and decrypt the data files locally, so that the programmer would not access data at all.
- the Python file would then create aggregated results and send (or share) them to other team members.
On that project, no decision has been taken yet, likely to happen end of Q2.

But my history is close to map...'s one :
- I tried mind map tools and was dissatisfied (I don't care about "beautiful links" and I'm colorblind). I mostly use Excel sheets for that.
- I searched for decades for the perfect file editor (still notepad++ for me, I'm not the vi or emacs type)
- I also used OneNote (on a on-off, not really satistied basis)
- My interest on python is both on "datafile crunching" and "time series graphics"
- I used twiki 20 years ago and contributed a few routines, including HandlingPlurals (now removed, only echoed on Ward Cunningham c2.com, stale recently, i.e. in 2015)

In the mean time/week, I installed leo (once), wrote my first outline, lost it (maybe it's somewhere on my computer), and discovered a few things that should be documented IMHO but could look obviously trivial for the core team
- a .leo file is using XML and using userid and timestamps for node description, but the text is ... untouched UTF-8?
- leo is said to be "an editor" written in Python, but includes ... a copy of an editor (CKEditor4) that is apparently written in Javascript, and unpatched since 2014 (and unused ?)
- leo commands are of the form "@name", most of which a newbie like me should ignore, and some of which are purposely undocumented (@root and others)
- for a newbie, there could be more answers to FAQ in the history.leo file than in the FAQ itself.
- the minibuffer is inherited from emacs, and serves ... a yet to discover number of functions
- many of the .leo files are probably there for history only. Could be an interesting journey, wonderland, or getting lost in useless files (or nodes ? or sth else ?)
- several the .leo files are information that may be important only for .leo developers (or maybe only the inventor himself ?). My limited python experience give me absolutely no clue what they could be used for. In any case, there are not tagged "for dev only" or so.
- the leo windows is using Qt internally
- EKR is the userID of Edward, the inventor and maintainer  of leo
- highlighted text (including URLs are NOT links. you need to copy/paste them to open (or maybe use a still-to-discover setting)
- opening leo will open the "workbook.leo" outline by default, but likely others as well according to settings.

tbp1...@gmail.com

unread,
Mar 22, 2022, 7:50:08 PM3/22/22
to leo-editor
It's true that there can be a huge learning curve if you want to get beyond the obvious and do some custom things. Yet if you learn to use @file and @clean files, and especially if you want to develop in Python, or do some Sphinx-style documentation,  you can get that going pretty easily.  Because Leo is so large, complicated, and flexible, it can be hard to track down the information you need.  And I don't think anyone is going to do much more documentation - and it would be hard to organize in a way that is both helpful and practical to search.

Really, there's a need for a Leo book.  I have no idea who would be willing and knowledgeable enough to write one.  I don't know enough, and anyhow I don't have another book left in me.

But it can be very rewarding when you finally get some piece of code that does something you need but that doesn't seem to exist.

A programming tip  for scripts that run within Leo is to try to use existing Leo commands - the ones you would normally launch from the minibuffer (that is, by starting with ALT-x).  In a script, you can run a command by knowing its name:

c.k.simulateCommand('command-name')  # c and g are always available to scripts
# or
c.executeMinibufferCommand('command-name')

Why two commands that seem to be similar?  Heck, I don't know - must be some historical reason. g gives access to just about any app-wide Leo function, data collection, or class.  c gives similar access to things that are local to the selected outline, including the selected node.

Once you have written a script you like and might use frequently, you can turn it into a new Leo command, on the same footing as the built-in commands.   You can execute it from the minibuffer, or put it into a launch button or a custom menu item.  It's still not totally obvious how to do these things, but at least in this case there is some help from documentation, and in looking at how it's done for other scripts and, say, launch buttons (right-click on a button to go to its script).

Plus asking here!

jkn

unread,
Mar 23, 2022, 10:21:50 AM3/23/22
to leo-editor
A couple of points from this interesting list:

> - leo ... includes ... a copy of an editor (CKEditor4) that is apparently written in Javascript
Really?!?

> - highlighted text (including URLs are NOT links. you need to copy/paste them to open (or maybe use a still-to-discover setting)
Ctrl-click on a URL will (should) take you there. I am not sure where this is documented, there are probably more of these. There is a recent discussion about 'right-click on the splitter bar' which gave hints of a world beyond my knowing...

> - the minibuffer is inherited from emacs, and serves ... a yet to discover number of functions
Personally I think 'minibuffer' is an unhelpful name, it's just an interface to allow you to enter commands to Leo. Type 'show-commands' in the minibuffer and you should get a long list of available commands in the log window.

    HTH, a little at least
    J^n

tbp1...@gmail.com

unread,
Mar 23, 2022, 10:41:05 AM3/23/22
to leo-editor
On Wednesday, March 23, 2022 at 10:21:50 AM UTC-4 jkn wrote:
A couple of points from this interesting list:

> - the minibuffer is inherited from emacs, and serves ... a yet to discover number of functions
Personally I think 'minibuffer' is an unhelpful name, it's just an interface to allow you to enter commands to Leo. Type 'show-commands' in the minibuffer and you should get a long list of available commands in the log window.

And in the latest changeset in the devel branch, there is show-commands-with-docs,  which shows the docstrings with the commands. Sometimes that can help understand what they do.
   

tbp1...@gmail.com

unread,
Mar 23, 2022, 10:45:27 AM3/23/22
to leo-editor
Oh, yes, and when you get a long listing in a tab like the commands listing, you can select all the output with the usual CTRL-A and copy it with the usual CTRL-C.  Then you can paste it somewhere that is more readable, like a Leo node or a text editor.

tbp1...@gmail.com

unread,
Mar 23, 2022, 11:03:55 AM3/23/22
to leo-editor
On the subject of CTRL-clicking, Leo has a feature that is fantastic when you are cruising around in its source code trying to learn how something works.  If you CTRL-click on a method invocation, you will get transported to its definition.  It misses once in a while, but usually  works.

Here's an example you can walk through.  Open the LeoPyRef.leo outline (File/Open Specific Leo File).  This contains Leo's code base. In the tree view, select Command Classes and expand it, then select @file ../commands/checkerCommands.py  and expand that.  Expand class MypyCommand and select the mypy.check_all node.  In the body you will see self.check_file(fn).  Hmm, what does that do?  CNTL-click on it, and Leo will navigate to the mypy.check_file node.  In this case the node is right there in view anyway, but in other cases it could be somewhere else and you'd have trouble finding it.

You can navigate back to the starting point by clicking the back arrow button (twice in this case).

Leo is loaded with goodies like this but it can be hard to find out about them.

Jacob Peck

unread,
Mar 23, 2022, 11:13:18 AM3/23/22
to Leo-editor Group
On Wed, Mar 23, 2022 at 11:04 AM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
On the subject of CTRL-clicking, Leo has a feature that is fantastic when you are cruising around in its source code trying to learn how something works.  If you CTRL-click on a method invocation, you will get transported to its definition.  It misses once in a while, but usually  works.

Been using and hacking on Leo since 2013 and I had no idea about this.  This changes everything.  Thanks for this.

FWIW, I stumbled on Leo while looking for something that would organize my notes for a tabletop RPG campaign in a sensible manner.  Being a programmer, the whole 'everything is scriptable, data is accessible anywhere' bit really made me excited.  It's my primary IDE these days, and I've written quite a few 'LApps' (leo-apps) that live inside their own outlines for various tasks -- effectively custom tools.  Leo is pretty central to how I interact with data and organize information.  It's a grand tool.

tbp1...@gmail.com

unread,
Mar 23, 2022, 11:54:40 AM3/23/22
to leo-editor
On Wednesday, March 23, 2022 at 11:13:18 AM UTC-4 gates...@gmail.com wrote:
 It's my primary IDE these days, and I've written quite a few 'LApps' (leo-apps) that live inside their own outlines for various tasks -- effectively custom tools.  Leo is pretty central to how I interact with data and organize information.  It's a grand tool.

I learned about another terrific feature just a few weeks ago that will whet your appetite if you don't know about it already.  Say you want to write a mini-application, and it should write to some display, and not to one of Leo's standard panels. So you would want to construct a custom widget, but how to use it in practice?  Making a plugin and getting it into the splitter is tricky, especially if you haven't done it before, and there's a degree of boilerplate, etc.

Turns out that you can create a new tab for it in the log pane with almost no effort.  That's how those tabs like Find, Spell, Nav, etc are handled.  I was able to adapt my viewrendered3 plugin into a non-plugin tab in about 15 minutes at most.  I have got a browser bookmark manager running in its own tab.

Basically you ask the tab manager to open a new tab that has your widget, like this:

# Imports first
log = c.frame.log
log.selectTab('Your Tab', widget = yourWidget(c, g)) # or whatever args you need

That's it!  The tab manager handles all the layout, naming, etc, technicalities for you.  After you've got the tab, you can switch to it programatically by calling selectTab()with its tab name, omitting the widget.

Christophe Vermeulen

unread,
Mar 23, 2022, 1:45:46 PM3/23/22
to leo-editor
 I don't think anyone is going to do much more documentation - and it would be hard to organize in a way that is both helpful and practical to search.
if you want to do some Sphinx-style documentation
Actually, I discovered the existence of Sphinx as a side effect of my discovery of leo.  

Leo is so large, complicated, and flexible, it can be hard to track down the information you need
 That statement is a little bit in contradiction with the  main marketing message ;-) Not that I disagree.
 
  I don't think anyone is going to do much more documentation
I hope you will be proven wrong, because this is one of the thing that limits leo's popularity. At least core-developers should know it. Of course, then they are free to care or not.
 
Really, there's a need for a Leo book.  I have no idea who would be willing and knowledgeable enough to write one.  I don't know enough, and anyhow I don't have another book left in me.
I know definitely less, and I never wrote a book. But for an "outliner", the inexistence of _any_ book is strikingly paradoxal, isn't it ? Shouldn't starting "the (outline of the) Leo book in leo" be a trivial task for any of the core contributors ? (Just kidding)

But it can be very rewarding when you finally get some piece of code that does something you need but that doesn't seem to exist.
That's the worst : it may exist, but you (at least I) don't know it.
 

Christophe Vermeulen

unread,
Mar 23, 2022, 1:50:01 PM3/23/22
to leo-editor
On Wednesday, March 23, 2022 at 4:13:18 PM UTC+1 gates...@gmail.com wrote:
Being a programmer, the whole 'everything is scriptable, data is accessible anywhere' bit really made me excited. 
I'm not even sure I'm a programmer, but reading this, I guess I'm not.
 
 Leo is pretty central to how I interact with data and organize information.  It's a grand tool.
I can feel it, but I don't know
- if I will be able to "really adopt it" (meaning making it an obvious choice, like Excel or PlanMaker for tables)
- how long it takes to become proficient with it.

jkn

unread,
Mar 23, 2022, 3:27:02 PM3/23/22
to leo-editor
Actually, when I was writing that I was thinking about having "show-command <previously-identified-command>" do that...

jkn

unread,
Mar 23, 2022, 3:29:13 PM3/23/22
to leo-editor
On Wednesday, March 23, 2022 at 3:03:55 PM UTC tbp1...@gmail.com wrote:
On the subject of CTRL-clicking, Leo has a feature that is fantastic when you are cruising around in its source code trying to learn how something works.  If you CTRL-click on a method invocation, you will get transported to its definition.  It misses once in a while, but usually  works.

Here's an example you can walk through.  Open the LeoPyRef.leo outline (File/Open Specific Leo File).  This contains Leo's code base. In the tree view, select Command Classes and expand it, then select @file ../commands/checkerCommands.py  and expand that.  Expand class MypyCommand and select the mypy.check_all node.  In the body you will see self.check_file(fn).  Hmm, what does that do?  CNTL-click on it, and Leo will navigate to the mypy.check_file node.  In this case the node is right there in view anyway, but in other cases it could be somewhere else and you'd have trouble finding it.

You can navigate back to the starting point by clicking the back arrow button (twice in this case).


Bl**dy hell, I remember now, there used to be forward and back arrows on the toolbar, didn't there? Why do I no longer see them??

Jacob Peck

unread,
Mar 23, 2022, 4:01:58 PM3/23/22
to Leo-editor Group
On Wed, Mar 23, 2022 at 3:29 PM jkn <jkn...@nicorp.f9.co.uk> wrote:


Bl**dy hell, I remember now, there used to be forward and back arrows on the toolbar, didn't there? Why do I no longer see them??


I think they're part of the nav_qt.py (or similarly named) plugin.  Might not have it in @enabled-plugins :)

jkn

unread,
Mar 23, 2022, 4:13:23 PM3/23/22
to leo-editor
Thank you - somewhat amusingly I see in the plugins directory on this machine (my main one, for a long time),
I have a nav_qt.pyc file from 2016!

I guess I lost the plugin during some period of leo unuse around that time, and didn't re-enable it,
nor remember about the buttons, when I later updated things.

How I've been suffering for the last 5+ years...

    J^n


tbp1...@gmail.com

unread,
Mar 23, 2022, 4:38:30 PM3/23/22
to leo-editor
Here are two utility commands/scripts I use that help with this kind of thing.  

1) get_plugins -- Show all plugins with their their docstrings.
2) Create Outline From Clipboard -- With a copied node or entire outline in the clipboard, create a new outline from it.

Run  get_plugins  with CTRL-B to install its commands.  Run the Create Outline From Clipboard  node with CTRL-B when you have a node or outline in the clipboard to create a new outline with that node.  It's convenient for making small outlines to share, like this attached one.

In the output from get_plugins we can find this bit:

nav_qt.py              
    Adds "Back" and "Forward" buttons (Qt only).  Creates "back"
    and "forward" buttons on button bar. These navigate the node
    history. ...


It's a whole lot easier than pawing through LeoPyRef to try to find out what they do.

leo-utilities.leo

Félix

unread,
Mar 26, 2022, 8:34:29 PM3/26/22
to leo-editor
The title of this thread made me remember when I discovered Leo: it was back in 2002 on slashdot... reading the description I just had to try it out! 


I remember that evening, when I was amazed at the simple outline navigation and editing inspired from the 'MORE' outline editor, and the file generation/importing it allowed.

Ah! some nostalgia about 2002, those were the good old days of my 20's!

Félix

Reply all
Reply to author
Forward
0 new messages