The new code is in the ekr-execute-script branch.

#1715 <https://github.com/leo-editor/leo-editor/issues/1715> and PR #1941 
<https://github.com/leo-editor/leo-editor/pull/1941/> describe Leo's new 
execute-general-script command, which makes it much easier for people to 
run scripts (including external files) in languages other than python.

The general idea is simple: use subprocess.Popen to run the language 
processor for a language other than python. However, I have spent about a 
week handling the details, especially the details of handling clickable 
links to error messages.

*Settings*

The  *@data exec-script-commands* setting associates languages (values of 
@language) with the command needed to run the external language processor 
for that language.

The *@data exec-script-patterns* setting gives the regex required to get 
file names and line numbers from the error messages given by the language 
processor. Entries are optional: the command creates clickable links only 
if a regex is given.

*Summary*

The execute-general-script command calls an external language processor and 
creates clickable links from error messages. The details are tricky. In 
other words,  this command is a crucial missing feature of Leo.

Please test the command, either directly, via 
<Alt-x>execute-general-script, or indirectly, using the official helper, 
*c.general_script_helper*.

This command will be part of Leo 6.4. I'll merge this branch into devel in 
a few days. 

Edward

-- 
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/26930e38-4f26-4541-b111-0be3a474da7an%40googlegroups.com.

Reply via email to