A recurring theme here at Irreal is the notion of Emacs as a Lisp Machine (see here and here, for example) and the advantages that this point of view provides. Now Martin Fowler explores this idea a little more with a beautiful post entitled InternalReprogrammability. Fowler begins by recounting an anecdote that most Emacs users will find familiar: He’s typing along and realizes that he needs to put a blank line above the line he’s currently typing but Emacs doesn’t provide a built-in way of doing it. This has come up before and now he’s fed up and decides to do something about it. That “something” is to add a bit of Elisp to his .emacs
file and execute it. Problem solved. Fowler makes some useful observations about this:
- He doesn’t leave Emacs to do this.
- He doesn’t have to restart Emacs after he does it.
- His addition is indistinguishable from the core code of Emacs. This is how Emacs itself is built except that most of it doesn’t live in his
.emacs
file.
Notice how much this is like what the Lisp Machines provided. You can change or extend your environment without leaving it. Everything you need is right there and you have the same rights and capabilities as the original implementers.
Fowler goes on to remark how rare this is. Lots of software has some form of extensibility but mostly this involves plug-ins or the ability to add scripts. That’s different from Emacs where you can “reach deep into the editor’s guts” and change any behavior at all not just those aspects that the implementer has chosen to expose.
This is a great post and you really should take a look at it. It will give you a renewed appreciation for how powerful and special Emacs really is.