On Oct 1, 2:50 pm, "Edward K. Ream" <[email protected]> wrote:
> Despite the many cool features of Emacs, I am unlikely ever to enjoy
< working there.  Leo is *much* better for what I do.

Aha!  On my walk I saw a way forward.  Do all the development in Leo
and Python!

This is easy to do!  leo.el would simply set up pymacs and then call
leo-mode-init.  Something like this:

; Ensure pymacs is loaded.

; Call leo-mode-init to finish initing the leo major mode.
(pymacs-load "leo_mode" "leo-mode")
(pymacs-call "leo-mode-init")

leo_mode.py will contain virtually all the code.  In particular, it
will define an EmacsLeoGui class that will interface with emacs.
Almost all the elisp code will reside in that class.  The class will
handle key bindings and all **Leo-specific** aspects of the screen.
Of course, it will use Emacs code whenever possible.  EmacsLeoGui
will be of comparable complexity to tkGui.py, which is to say, not all
that complex, especially considering that Emacs buffers are character-
oriented, not pixel oriented.

Notes:

- In many ways, leo-mode will act like a Leo bridge.

- Users would specify key bindings as usual, but there will be no need
to specify bindings for Emacs commands.  Thus, we would want a
separate myEmacsLeoSettings.leo file.  Note that "handling bindings"
will use Leo's *existing* Python code, except for a 2-or-3-line
wrapper that calls global-set-key or local-set-key.

- Some tweaks to Leo's startup code in runLeo.py will be necessary.
For example, we might prefer to use myEmacsLeoSettings.leo if it
exists, rather than myLeoSettings.leo.

- It remains to be seen whether Emacs's minor modes are capable of
syntax coloring buffers with Leo directives.

- Most commands in leoEditCommands will become unnecessary, as will
leoKeys.py and other files.

- leoNodes.py, leoAtFile.py and leoFileCommands.py will remain
strictly unchanged.

- leo mode will steal any useful code in org.el and the rest of the
org mode files.   It's possible that much of the code would be usable
as is.  If not, I would likely transliterate it to Python.

I am not likely to do any of this before a1, but I'll probably do some
background research.

The bottom line is this:  my competitive juices are flowing.  I think
developing leo.el and leo_mode.py might bring Leo to a much wider
platform.  In the process, it will show the world what a "real" org
mode would look like :-)

OTOH, I'm not ready to commit to such a project just now.  Still, the
prospects of hosting Leo on a what might be the world's largest
platform is intriguing...

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