This is an Engineering Notebook post.  Feel free to ignore; all comments 
are welcome.

I am planning to have @org-mode and @vim-outline mode convert org-mode 
files and vim-outline files (collectively, **foreign files**) to Leo 
outlines without munging the text in any way.  There are pros and cons to 
this approach:

Pros:

- It is the simplest thing that could possibly work.
- It will preserve all data from foreign files.
- It might make round-tripping possible, preserving the foreign file when 
you haven't changed it in Leo.

Cons:

- Neither org-mode nor vim-outline files are a good match for Leo's view of 
data or files.
- org-mode files contain *visible* sentinels (#+BEGIN and #+END lines) 
delimiting fragments of code in various languages.
  Preserving those sentinels in body text would add a lot of clutter to the 
@org-mode tree.
- Extra steps are needed to convert @org-mode or @vim-outline trees to, 
say, @file trees.

Leo outlines are very different from outlines in either Emacs or Vim.  This 
has many implications:

1. Neither vim nor Emacs outlines files can be used unchanged as computer 
programs, because outline delimiters in Emacs and Vim are not comment lines.

2. Explicit tangling is required (in Emacs) to create external files.  
Afaik, Emacs has no notion of untangling.  As a result, org-mode programs 
are like @nosent files in Leo.

3. Afaik, Vim supports neither tangling nor untangling.  This means that 
vim-outline mode has *no* way or representing programs.

I keep saying Afaik.  Here's what I do know:

- Emacs: http://orgmode.org/manual/Working-With-Source-Code.html
- Vim: 
http://www.troubleshooters.com/projects/alt-vimoutliner-litt/littvolinks.html
  All vim links are old; many are broken.  Otoh, work continues on 
vim-outline mode.

===== Summary

Importing org-mode or vim-outline files into Leo will be supported.  The 
question is, should this be done with explicit import/export commands or 
with @org-mode and @vim-outline trees?  Such trees would work like @file 
trees except that they use org-mode or vim-outline conventions for 
representing outlines.

I am leaning towards using @org-mode or @vim-outline trees, with the 
read/write code leaving the foreign text unchanged as far as possible. We 
could convert org-mode text to a Leo outline by:

1. Changing @org-mode to @file and
2. Optionally running a script (command) that would strip of the org-mode 
#+BEGIN/END sentinels.

That's it for now.  I would appreciate any comments, and especially any 
comments from those who know more about org-mode and vim-outline mode than 
I do.

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