Could Emacs be rewritten in Python?

Patrick K. O'Brien pobrien at orbtech.com
Sun Apr 6 21:53:41 EDT 2003


llothar at web.de (Lothar Scholz) writes:

> > "comparable in power."  The reason is that there is a ton of elisp
> > code out there, including most of Emacs itself, that could be
> > translated to work with PyAlaMode.  My goal isn't to be able to
> > convert in a completely automated fashion, but close enough to be
> > attractive to both an elisp programmer and a Python programmer.
> 
> Sorry, have you ever written a elisp program, something that is larger
> then
> 100 lines. I can't think about a way to provide this in python without
> writting a lisp like interpreter. Remember that the scope of elisp
> variables for example are not lexical. This is something very hard to
> emulate in python.
> I would really suggest to look at the structure of keyhandling,
> keymaps and buffers. And then forget about lisp and design a good
> python editor.

No, the only elisp I've dealt with has been trivial changes to .emacs
and similar files.  I don't want to write a lisp-like interpreter.

All I *really* want to support are the Emacs concepts, not the actual
code, especially if there is no simple way to automatically translate
elisp into Python.  I've been assuming there is an advantage to making
the PyAlaMode API conceptually similar to the Emacs API.  Maybe there
isn't and I'm giving the Emacs API more credit than it deserves.

Is it enough to support the following:

* default Emacs keybindings
* ability to remap keybindings
* multiple buffers and multiple windows
* multiple modes
* keyboard friendliness (no need for a mouse)
* minibuffer-style control of environment

If not, what's missing and what's the definition of a "good editor"
written in Python?  Should it allow customizations and extensions,
like Emacs, but be a completely new and Pythonic API?

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------




More information about the Python-list mailing list