Could Emacs be rewritten in Python?

Sean 'Shaleh' Perry shalehperry at attbi.com
Tue Apr 8 00:40:15 EDT 2003


>
> Now *that's* an interesting idea! We would have, not a text
> editor, but a general hierarchical structure editor. Editing
> plain text would just be a special case, when we're editing
> an object of type "string".
>
> This would solve a number of problems at once. Syntax
> dependent editing is done by parsing the source into
> a tree of objects that know how to display and edit
> themselves. Embedding of "foreign" editing modes is done
> simply by inserting an object of the appropriate type into
> the tree. Want an reSt comment in your Python code? Just hit
> M-x insert_py_rest_docstring and off you go!
>
> The more I think about this, the more it seems like a
> REALLY REALLY interesting idea...
>

and it is.  However the reason most of the emacs modes, vim syntax 
definitions, etc all don't quite work is they are regex based.  To really get 
where the  structure editor needs to be would require a parser for each item 
type.  Not a trivial task.





More information about the Python-list mailing list