On Mon, 21 Jul 2014 07:37:34 -0700 (PDT)
James Wilson <[email protected]> wrote:

> 
> As a quick reminder, a few people have asked about the possibility of 
> @auto-md (for Markdown) in the past. Would it be possible to add
> this? (There is an open bug about this: see 
> https://bugs.launchpad.net/leo-editor/+bug/1233134.)

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, like:

  class AutoLaTeX(LeoAutoLoader):
  
      name = "LaTeX document format"
      file_patterns = (r'.*\.tex', )
  
      def load_tree(self, file_name):
          ...
      def write_tree(self, p, file_name):
          ...

  LEO_AUTO_LOADERS = [AutoLaTeX]

then 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.

No immediate need to convert the existing "in core" loaders, but just
an easier way to make new ones going forward?

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

Cheers -Terry


> James
> 
> On Monday, 21 July 2014 14:14:48 UTC+1, Edward K. Ream wrote:
> >
> > On Sunday, July 20, 2014 2:38:09 PM UTC-5, Edward K. Ream wrote:
> >>
> >> Leo now supports @auto-vim-outline and @auto-org-mode, with
> >> @auto-otl and @auto-org being synonyms.
> >>
> >  
> >
> >> Next:  documentation on Leo's web site, not just buried in release
> >> notes!
> >>
> >
> > Done:
> >
> > http://leoeditor.com/emacs.html#using-org-mode-org-files-in-leo
> > http://leoeditor.com/vimBindings.html#using-vimoutline-otl-files-in-leo
> >
> > EKR
> >
> 

-- 
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