Could Emacs be rewritten in Python?

Carl Banks imbosol-1050339953 at aerojockey.com
Mon Apr 14 14:09:25 EDT 2003


Christian Tanzer wrote:
> All these functions (except the one you're writing) might have been
> implemented years before the text properties and
> `inhibit-point-motion-hooks` were introduced.

See, that's really the problem.  It's obvious why history made Emacs
what it is, but it doesn't change the fact that, as it stands now,
Emacs is a terrible software design.

Now, Emacs has a variable inhibit-point-motion-hooks.  If Emacs were
currently designed well, this variable would not be needed, because
functions would be able to operation without touching the point.

Now, Emacs has a current bufferm, and a current point in a buffer,
which all text operations take place it.  Right now, you have to use
macros such as save-excursion and with-current-buffer, because right
now, text manipulation functions implicitly use the current buffer and
current point.  If Emacs were currently designed well, functions would
accept a buffer to work on as an argument, and there would be no need
to change the buffer temporarily.

And so on.

So, basically, what I'm saying is, most of the time when you need
these implicit parameters is because Emacs isn't a good design.

A redesign in Python does not need to make the same mistakes.

(As for things like buffer-local variables, I don't think it's a big
deal to make them attributes of a buffer class.  Frame local
variables, frame objects.  I think it's quite short-sighted to try to
force buffer-local variables to be regular variables, and not what
they obviously should be, attributes of the buffer, just because Emacs
does it that way.)



-- 
CARL BANKS




More information about the Python-list mailing list