Could Emacs be rewritten in Python?

Patrick K. O'Brien pobrien at orbtech.com
Sun Apr 6 11:55:19 EDT 2003


aahz at pythoncraft.com (Aahz) writes:

> In article <m2k7e7addl.fsf at localhost.localdomain>,
> Patrick K. O'Brien <pobrien at orbtech.com> wrote:
> >
> >Sure.  The new editor, PyAlaMode, is in the PyCrust CVS repository on
> >SourceForge:
> >
> >http://sourceforge.net/projects/pycrust
> >
> >While it works, I plan to revise it quite a bit.  Right now it just
> >uses the standard Scintilla keybindings, and there is no way to change
> >them.  In fact, there is no way to customize it at all.  But before I
> >add all those kind of features I want to design the architecture and
> >make it based upon and semi-compatible with Emacs.  If we that and
> >make it easy to integrate with Bicycle Repair Man that should make it
> >closer to a Smalltalk type environment.  But first I need to get the
> >foundation in good shape before I pile on features.  I'll take all the
> >help I can get.
> 
> Using "semi-compatible" confuses the issue, I think.  What you want is
> "comparable in power".  Another project you might want to look at is the
> Python binding for vim.

No, I really want something very similar to Emacs, not just
"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.

That means all the Emacs primitives need to exist and be spelled the
same (other than using underscores instead of dashes in the names),
and the ability to register functions and bind keystrokes needs to be
there, including support for define-key, global-set-key,
local-set-key, and commands bound to multiple keystrokes using
ctl-x-map and esc-map.

Plus, much of Emacs works very well.  So I'd rather benefit from
whatever design lessons the Emacs folks learned than make all the same
mistakes myself.  (I like making new mistakes.)  And if we can remove
some Emacs warts, that would be even better.

And since Emacs has a Vi mode, maybe we'll even get you using
PyAlaMode.  ;-)

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