On Mon, Jul 21, 2014 at 9:52 AM, 'Terry Brown' via leo-editor
<[email protected]> wrote:

> Given the almost unlimited number of "@auto" formats people might want
> (I'd like R and coffeescript, and LaTeX), I think we're going to need
> some kind of module interface...

Good idea.  It shouldn't be too hard to do.  I'll see what I can do today.

> all these modules go in a directory Leo scans, looking for
> LEO_AUTO_LOADERS defined in each module it finds, and registering each
> listed loader class.

Yes.  Importers will go in /leo/plugins/importers  Importers can be
named r.py, coffeescript.py, latex.py... Leo will check conventions
(existence and signatures of readers, writers, etc.) when doing the
import.

> When saving a file, Leo might do something like
>
>   loader.write_tree(p, tmp_file)
>   chk = loader.load_tree(p, tmp_file)
>   if compare_trees(p, chk):
>       ... copy tmp_file to proper output destination
>   else:
>       ... handle round trip failure

Sigh.  A warning would be good. The checks and warnings greatly
complicate the existing @auto code though...

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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to