On Sat, 18 Jan 2020 15:36:36 -0800 (PST)
andyjim <andyji...@gmail.com> wrote:


> My thought is to arrange all this in external plain text files
> initially, with the outline organization being in Leo, leaving the
> files external 

Hi andyjim,

The thread you started long ago moved away from the preceding desire.
Your preceding desire should be very easy to accomplish using the same
method VimOutliner accomplished it: Use executable lines. Somewhere on a
headline, or as a direct child of a headline, have a command to view
the external file, so that if you hotkey the headline, it runs the
command and pulls up the file.

So you could have a hotkey with the command "inkscape myimage.svg",
another one "libreoffice mybook.odt", and another one "leo
my_trip_plan.leo" **.

There are a million ways to do this. The way it's done in VimOutliner
is to have a line with the following format:

[Name] _exe_ command_with_args

The brackets mean the name is optional. If you place the cursor
anywhere on that line and type ",,e" then that command is run, with the
result that a window with the desired document appears.

I don't think there's a facility for comma comma commands in Leo, but
whatever the native hotkey system is will handle it nicely. The
function run by the hotkey is basically the following:

def execute_line:
 arr = thisline.split("_exe_", 3)
 if len(arr) > 2:
   os.system(arr[2])

Don't shoot me if I got the preceding commands wrong: I've been doing
Tcl the past month and have confused my Python. But you know what I
mean: Split it around _exe_ with a maximum of 3 elements, and if it has
3 or more elements, execute the 3rd (and final) element of the split.

When the external file is a Leo file, I'm pretty sure you can copy and
paste into the main file, if you want. But I'm a big fan of having a
"single tree of knowledge" such that I can drill down to any knowledge
I have by just doing executable lines.

[**] VimOutliner has a separate command for .otl files that brings the
external file into the *current instance* of VimOutliner, but I don't
think this is necessary in Leo.

> One reason I'm looking at Leo for this is that I think I'm going to
> have to just start bringing material into an outline system, note by
> note, and evolve the classing and relationships 'as she goes'. 

I think the preceding is an excellent plan, although I could make a
case for keeping some of the files separate forever.

SteveT

Steve Litt 
February 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive

-- 
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/20200211115532.08b46978%40mydesk.domain.cxm.

Reply via email to