A lot of really heavy geeks spend most of their day interacting with a single computer program named Emacs; it has a rich history going back to the seventies, although the current incarnation (written in large part by the well-known programmer/activist Richard Stallman) dates from the mid-eighties.

If you are seriously professionally concerned with editing text in a sustained and sophisticated way, especially if a lot of that text is to be used for anything-but-printing, Emacs is simply the best tool for the job.

The documentation is appalling and the learning curve is steep, but then this is often true of high-powered tools for pros. Neal Stephenson wrote this up better than I can.

Emacs is ultimately customizable. It contains a complete progamming language, usually called "elisp", and anything the editor can do, from inserting a single keystroke into a file up to summarizing a large body of network mail traffic in a search for spam, is written as an elisp program. Any key on the keyboard can be made to run any elisp code, which means can be made to do anything. That's right, you could arrange that hitting the 'e' key would publish a copy of the Communist Manifesto to your website and emailed a copy to the White House (of course, this would make it hard to edit ordinary text files).

Normal people (to the extent that any emacs user is normal) tie useful functions to key combinations like control-L, alt-X P, and to function keys if (unlike a Macintosh laptop) your computer has them.

Of course, since Emacs comes with a million lines of elisp code to do just about anything you could possibly imagine, most times you don't have to write any, you just point some key combo at a useful piece of it.

Every Emacs user tends to have a file in their home directory called .emacs that contains their own personal key mappings and elisp code. It would be slightly better practice to have your own elisp code spread out in a bunch of well-organized files that you load from your .emacs, but then any time you change computers you have to carry all this stuff along, so I just glommed everything into .emacs.

I've been using Emacs for about 18 years, and there's only 250 lines in my .emacs, but I'm lazy and elisp is a pretty compact programming language. Mine contains 24 key mappings and defines 19 elisp functions, which among other things:

  • Customizes the look of the Emacs Window.
  • Loads some custom C-language editing code.
  • Emulates the control-G function from "vi"
  • Start, proof, and publish ongoing notes
  • Add and subtract one from whatever my cursor is on, if it's a number.
  • Put a column counter at the top of the page.
  • Turn case sensitivity on and off.
  • Remind what file I'm looking at.
  • Help me deal with the situation when I'm editing a bunch of different files with the same name, like for example index.html.
  • Starts up an Apache web server in debug mode.
  • Loads my own custom XML editing mode (which I discover is actually in another file, so not everything is in .emacs after all.

This file really represents my personal archeology, some of the functions are there to solve problems I had on projects I was working twelve years ago. But for sentimental reasons I can't erase them.


author · Dad
colophon · rights
picture of the day
January 29, 2003
· Technology (90 fragments)
· · Emacs (7 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!