On Tue, Jul 22, 2014 at 7:42 AM, Edward K. Ream <[email protected]> wrote: > 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.
There is a subtlety that applies only to .otl and .org files, namely that they could contain almost any kind of text. The file suffix doesn't specify, for example, syntax coloring. This does not apply to .r or .tex files, and @auto should work for everything else. BTW, @auto-rst exists because just files could have either .rst or .txt suffixes. Having said that, it seems to me that @auto would suffice if an @language rest appears in the root node. But this is a nit. Regardless of such fine points, a plugin architecture for importers makes sense. Even the existing importers would better be modules in leo/plugins/importers rather than hard-wired code in leoImport.py. So this is a good thing. > Sigh. A warning [about round-trip errors] would be good. The checks and > warnings greatly > complicate the existing @auto code though... Actually, the BaseScanner class contains the "perfect import" code. The new importer plugins should be able to use that code without fuss. Note Leo runs the perfect import code when *reading* an @auto file, not when writing it. 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.
