On Thu, Oct 18, 2012 at 3:18 PM, F.S. <[email protected]> wrote:

> Is it possible to have Leo expose an interface for parsing and editing @auto 
> nodes?

Great question.  The simple answer is yes:  *all* of Leo's source code
is available to any python program.  For example::

    at = c.atFileCommands

binds at to the atFileCommands "subcommander" for c.  This
subcommander is the way to get access to *all* of the code in
leoAtFile.py (!!)

Aha!  The leoBridge gives you complete access all of Leo's source
code.  This means that you should be able to create elisp wrappers for
*any* of Leo's python code.  For example, try this in a Python interp
(**not** Leo)::

    import leo.core.leoBridge as b
    b = b.controller()
    c = b.openLeoFile('') # Open an empty file just to get c.
    print(c.atFileCommands)

You can do much the same using pymacs.  As a result::

**There is no need to rewrite Leo's code in elisp.**

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to