Could Emacs be rewritten in Python?
Lothar Scholz
llothar at web.de
Sun Apr 6 15:44:38 EDT 2003
pobrien at orbtech.com (Patrick K. O'Brien) wrote in message news:<m2u1dcw22s.fsf at localhost.localdomain>...
> If you were crazy enough to think that you could create a program
> along the lines of Emacs, but written in Python, how would you go
> about it? How would you design the domain model for files, buffers,
> windows, and frames? How would you allow the same level of
> customizability? How would you map functions (or methods or whatever)
> to keys? Any thoughts?
Look at the basics, that is the 200.000 LOC of C Code in Eiffel.
It's good documented. And then skip it.
> Here is the background. I'm working on a file editor (called
> PyAlaMode) using wxPython and Scintilla. It's an extension of the
> PyCrust code base. I've got a basic version working, and it supports
> editing multiple files and all the usual, basic features. But I want
> it to be as customizable and extensible as Emacs. In fact, I want to
> model it after Emacs, so that elisp code could be rewritten in Python
> and work with PyAlaMode. To do that, I've got to support the same
> primitives as Emacs; expose files, buffers, regions, and windows the
> same way Emacs does; handle the Emacs keybindings and ability to remap
> keys, the same way Emacs does, etc.
Then you have to present the same old and ugly user interface with a
mini buffer as input line and so on. I don't see any reason at the
moment for cloning EMACS. You should ask people why they like emacs as
an editor.
There are only a handful of features that are normally the reason to
keep
this as your primary editor. For me its the window handling C-X 1, the
way to prefix commands with a repeat command, the macro recording and
a the autoindentation with TAB.
To make clear, i'm using XEMACS 8 hours a day for years now. But it's
absolutely losing ground compared to modern editors. And i don't think
that
extensibility in the emacs sense is really necessary today or a plus,
because
people want out of the box solutions that are specialized to their
domain.
>
> Sound like fun?
No, sounds like real work. Drinking beer and making love with your
girl friend is real fun. Everything else should be seen as a nonpaid
job.
More information about the Python-list
mailing list