EMACS, or the macro that became an editor
Sometime in 1976, Richard Stallman flew from Cambridge to the Stanford Artificial Intelligence Laboratory and sat down at a terminal running a text editor called E. What he saw was simple: he typed, and the screen updated. There was no mode to slip into, no Escape key to press between thoughts, no invisible command buffer accumulating in the background. Back at MIT, the standard editor was TECO — a tool that treated your text as the output of a program you hadn’t written yet, and the screen as something to be consulted afterward.
The MIT AI Lab ran on PDP-10 computers under the Incompatible Timesharing System — ITS, named partly to needle the Compatible Timesharing System running on other campus machines (Wikipedia). TECO, Text Editor and Corrector, had been the default there since the early 1960s. To edit a file, you entered insert mode with a keystroke, deposited your text, pressed Escape to leave, then issued commands to view what you had written. It worked, in the same way that communicating entirely by telegram works: technically, it gets the message there.
A hacker at the AI Lab named Carl Mikkelsen had already cracked part of the problem. He added to TECO a display mode triggered by Control-R, which updated the screen with every keystroke. Stallman came home from Stanford, reimplemented that mode to run efficiently, and then added something the system had never had before: a macro facility that let users redefine any keystroke to invoke a TECO program. The resulting system, assembled with Guy Steele and Dave Moon from two existing macro packages named TECMAC and TMACS, was operational by late 1976 and named EMACS — for Editing MACroS, or possibly E with MACroS, or — per a story that has never been confirmed and refuses to die — after Emack & Bolio’s, an ice cream shop on Massachusetts Avenue that several AI Lab regulars were known to frequent (Wikipedia).
The ice cream shop story is probably wrong. What is certainly right is that EMACS had already outgrown its origins before anyone finished the documentation. Its behavior had diverged so far from TECO that users simply forgot the macro layer was there. It became the standard editing environment on ITS almost by accident.
What set it apart was not the screen refresh — Mikkelsen had that idea — but the extensibility. Every keystroke was programmable. Stallman attached a social condition to this: EMACS was distributed with the requirement that all improvements be returned for incorporation and redistribution (Wikipedia). No lawyer had coined the word “copyleft” yet. Stallman called it a rule.
Within two years, five independent EMACS implementations had appeared on separate machines: one for the MIT Lisp Machine, one for Multics, one from Bell Labs, and others besides (Computer History Museum Software Preservation Group). By 1980, James Gosling had written a Unix version. In 1984, needing a free editor for the nascent GNU project, Stallman started over; GNU Emacs shipped in 1985 and is still in active development.
The rule he wrote for EMACS in 1976 eventually became the GPL. The GPL eventually became how Linux ships. That is a long chain for a document that started life as a set of macros on a PDP-10.
Sources
- Emacs — Wikipedia — Creation timeline, Carl Mikkelsen’s Control-R mode, Guy Steele and Dave Moon, the TECMAC/TMACS merger, name origin stories, the distribution-of-improvements condition.
- Emacs Historical Archive — Computer History Museum Software Preservation Group — Timeline of early Emacs implementations (1976–1980), five independent variants within two years, technical lineage from TECO to GNU Emacs.