Could Emacs be rewritten in Python?
Patrick K. O'Brien
pobrien at orbtech.com
Mon Apr 7 10:12:42 EDT 2003
Boudewijn Rempt <boudewijn at tryllian.com> writes:
> 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
>
> http://www.finseth.com/~fin/craft/
Thanks for the link. Someone else recommended it as well the other
day. I read it, but most of it is low-level stuff already handled by
Scintilla. What I need is the framework for modeling files,
documents, buffers, windows, commands, etc. I guess I'll just invent
my own (which is what I've already started to do, but it sure feels
like reinventing the wheel).
--
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