Could Emacs be rewritten in Python?

Patrick K. O'Brien pobrien at orbtech.com
Sun Apr 6 22:37:53 CEST 2003


Francois Pinard <pinard at iro.umontreal.ca> writes:

> [Patrick K. O'Brien]
> 
> > 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?
> 
> Hello, Patrick, and all pythoneers. :-)
> 
> I once was crazy enough to at least ponder doing something like
> this, being conscious of the huge amount of work such a project
> might represent.  I did starve for an Emacs environment scriptable
> in Python, but also was aware of the massive amount of knowledge in
> the Emacs distribution and project, and the rapid pace of Emacs
> development.  This would have been fairly difficult to follow and
> cope with in the long run.  No doubt to me that seriously tackling
> such a project could have swallowed me not only whole, but for a
> good part of my life.  I still felt too young to die! :-)

I expect to have a reasonable proximity within a year.  I expect to
have something I'm willing to put up with as my primary editor within
two to three weeks.  I expect that what I'm willing to put up with
will be seen as something wonderful by the Windows and Apple folks who
would never want to use Emacs and instead use stuff like Notepad (been
there, done that).  Remember, since I'm using wxPython this will run
on Linux, Windows, and Mac OS X.

> Pymacs seemed to me like a much more acceptable compromise, as it
> could be written relatively quickly, giving me a good part of all I
> wanted.  Oh, I'm surely not satisfied with the complexity of the
> mix, Emacs plus Python just cannot be simpler than a pure Python
> solution would have been, at least seen from a reasonable distance
> -- another planet, say? :-).  And moreover, there is a cost to the
> communication protocol between Emacs and Python which is better not
> be abused if you want good response times.

Do you think Pymacs would help me understand Emacs better, or should I
just dive into the Emacs source?

> > Sound like fun?
> 
> In a word, I would love to see a pure Python implementation of
> Emacs, but have the prejudice that it requires an extra-ordinary
> involvement, making that goal unreachable in practice for most
> mortal programmers...  So, even if Pymacs is far from ideal, for me,
> it has been a blessing.

I think getting the core functionality won't be that hard.  And even
if I only implement the bare minimum, the results should be better
than most other editors, aside from Emacs and Vi and whatever editor
anyone reading this likes... (please, let's not start any editor wars)

> All this being said, I sincerely wish that your project will succeed!

Me too.  Ignorance is bliss, so I might as well enjoy this moment when
it all seems possible.  If I knew then what I know now, I might never
have tried to create PyCrust either.

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