The new command to run external files, "execute-external-file", is now in 
the devel branch.  Thanks to all who helped me test and improve it!

This new minibuffer command will find the nearest external file root node, 
try to figure out what kind of processor to run it - python, ruby, julia, 
etc. - based on the @langauge directive in effect, and launch it in a new 
terminal that will remain open even after the program finishes.  The 
purpose of having a new terminal is 1) so the output can be read without 
getting mixed up with any Leo output, and 2) so that output can be seen and 
not interfere with other Leo output even for long-running GUI programs that 
a user may want to launch.

It was challenging to get the script to launch a new terminal that would 
also stay open in Linux.  It's possible that one or another Linux distro 
might have a terminal program that the script cannot figure out.  If so, 
the terminal to use can be specified in an @setting node.  The script has 
been tested in at least six different Linux distros and works in all of 
them, so almost no one should have a problem.  Tested distros: 
Mint/Cinnamon, Debian, Ubuntu, Manjaro (xfce), OpenSUSE, and Fedora.

If you want to launch programs with a processor that the command does not 
know about (currently python, lua, ruby, julia, cmd.exe and shell), you can 
use the same @setting node to specify it.  Read the docstring for more 
details.

Sad to say, the command does not work for MacOS yet.  I don't have a Mac 
computer, and I don't know key things like the name of the Mac terminal and 
shell.  If someone can help me with this, we should be able to get it going 
for the Mac as well.

I have used a predecessor of this script for years and would find it 
inconvenient to get along without.  I hope it will be useful to you too!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3d3811e4-2bd3-4faf-8c26-2812a02fe584n%40googlegroups.com.

Reply via email to