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!
On Tuesday, March 22, 2022 at 6:07:43 PM UTC-4 cve...@gmail.com wrote:

> 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.
>
> On Tuesday, February 27, 2018 at 10:10:52 PM UTC+1 map...@gmail.com wrote:
>
>> 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 
>> <https://web.archive.org/web/20080524194444/http://www.uttara.ca/patawi/matt/musings/favedit.html>,
>>  
>> 2010 <http://www.maphew.com/Musings/long-live-the-aurora-text-editor/>). 
>> Gmail says I subscribed to the Leo mailing list in 2009 with my first 
>> concrete contribution in August -- a Windows install recipe 
>> <https://groups.google.com/d/msg/leo-editor/rdYkLW9PxHY/Nph1SOhHOBcJ>. 
>> 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 
>> <https://support.office.com/en-us/article/What-s-the-difference-between-OneNote-and-OneNote-2016-a624e692-b78b-4c09-b07f-46181958118f>is
>>  
>> my primary writing and organizing tool (the web app is ...meh) and Pyzo 
>> <https://github.com/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
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/53ebc25d-41c5-4ef1-93a8-49ee332b51efn%40googlegroups.com.

Reply via email to