You are previewing Beautiful Architecture.

Beautiful Architecture

Cover of Beautiful Architecture by Georgios Gousios... Published by O'Reilly Media, Inc.
O'Reilly logo

Creeping Featurism

Emacs’s creeping featurism is a direct consequence of its architecture. Here’s the life cycle of a typical feature:

  1. When you first notice a feature that would be nice to have, it’s easy to try implementing it; Emacs’s lack of bureaucracy makes the barrier to entry extremely low. Emacs provides a pleasant, interactive environment for Lisp development. The simple buffer Model and automatic display update let you focus on the task at hand.

  2. Once you have a command definition that works, you can put it in your .emacs file to make it available permanently. If you use it frequently, you can include code there to bind it to a key.

  3. Eventually, what began life as a single command may grow into a suite of commands that work together, at which point you can gather them up in a package to share with your friends.

  4. Finally, as the most popular packages come to be included in the stock Emacs distribution, its standard feature set expands.

Similar processes are at work within the established codebase. Experience writing your own commands makes the code of Emacs itself that much more comprehensible, so when you notice a potential improvement to an existing command, you might bring up the command’s source code (linked to from its help text, as mentioned earlier) and try to implement your improvement. You can redefine Emacs Lisp functions on the fly, making it easy to experiment. If your idea works out, you can put your redefinition in your .emacs file for your own use, and post a patch ...

The best content for your career. Discover unlimited learning on demand for around $1/day.