On Sat, May 6, 2017 at 7:47 PM, SegundoBob <segundo...@gmail.com> wrote:
I was well into implementing what I call Leo-Babel when about a month ago a > post to this forum by Edward made me think that he was going to implement > it. So I stopped. But since that one post, I've seen nothing more about > Leo-Babel. So I finished my implementation and I'm happily using it. > Excellent work, Bob, and excellent documentation. I'm glad you didn't wait. My remarks were a month ago were just a vague statement that it is possible to execute scripts from Leo in any language. Here are some answers to your (possibly implied) questions in Leo-Babel.pdf: *Packaging*: Imo, this would make an excellent plugin. The plugins folder is a reasonable place for babel_kill.py. *Supported platforms*: It's fine to use Linux-only code. *Options*: I recommend using @bool and @string nodes for general options (but see below): @bool babel_create_nodes = True @string babel_interpreter = bash # or Python @babel_session = my-session @babel_redirect = False For per-node granularity, the babel plugin could support the following directives: @babel_no_nodes @babel_interpreter bash @babel_session my-session @babel_redirect But Emacs-like drawers (p.drawer) will soon be the way to go. Something like: babel_nodes:: False babel_interpreter:: bash babel_session:: my-session babel_redirect_to_stderr:: True The user interface for drawers will be simpler than for uAs (the attrib_edit plugin). Getting drawers working may have a higher priority than the present curses gui work... *Standard bindings:* The plugin will merely defined one or more commands, leaving the choice of bindings for those commands to the user. The plugin can also create menus. If the menus refer to the command names, Leo's startup code will (I think) add the user bindings for the (first) shortcut to each menu item. *Scripts as functions*: Your choice. It's usually straightforward to do anything like this in Python. *Babel tab or log tab:* Again, your choice. It's easy to write to a new tab. I have just verified that the following works: g.es('my message', tabName='Babel') *Summary* This is important work. Imo, it should be a plugin. Feel free to use regular settings or uA's for development, whatever is easier. Drawers will be the preferred solution for per-node options. 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.