Could Emacs be rewritten in Python?

Boudewijn Rempt boudewijn at
Mon Apr 7 15:02:54 CEST 2003

Patrick K. O'Brien wrote:

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

About a year ago I began something like that (mostly to teach myself how
an editor really worked). I extended Kalam -- the example application
in my PyQt book which used the Qt edit control -- with a backend that
represented buffers and a redisplay written in Python that painted the
glyphs and cursor on a widget with QPainter. Was quite fun until I lost
the source just as I had the redisplay working.

The best resource for someone implementing an editor from scratch is:

The Craft of Text Editing, or Emacs for the Modern World by Craig A. Finseth

Boudewijn |

More information about the Python-list mailing list