Profile
Back to NewsBack
Hacker News 3 min
Reader Mode
Emacs Turns 50

Emacs Turns 50

12 hours ago

By the early 1960s, programmers with interactive computers could use a “line editor” to type their code on teletypes—large, noisy keyboard-and-printer machines. They’d type one line of code at a time, and their work would be saved on a spinning hard disk the size of a modern washing machine. But there was still no such thing as the now-familiar full-screen text editors that allow programmers to see and modify many lines at a time on a display.

One of the first such tools, EMACS, turns 50 this year, and it is still widely used. 

EMACS first ran on the early video terminals at the MIT Artificial Intelligence Laboratory in 1976, but its core concepts were so powerful that it was rewritten for many operating systems in the decades that followed. Apple even distributed it with Mac OS X. Beyond that, the software-­sharing community that started around EMACS helped give rise to the modern-day free software movement and the GNU/Linux operating system.

EMACS’s roots begin with the TECO text editor (originally the “Tape Editor and Corrector”) that Dan Murphy ’65 created in 1962 for the pioneering PDP-1 computer at MIT. The program’s commands were uppercase letters: A user would type “I” to insert text, “D” to delete a character, and so on. When tape gave way as a storage medium to files on a huge shared disk, the “T” in “TECO” came to stand for “Text.” And as years passed, TECO became a full language that programmers could use to create new commands, called macros, for editing their code. 

In the fall of 1971, Carl Mikkelsen ’76 created Control-R, an add-on program for TECO that took advantage of “glass teletype” terminals with video displays. Control-R immediately displayed changes to the file being edited on screen; the programmer no longer needed to reprint each line to see the changes. The drawback: The display could show only a few lines of code at a time. 

“Experienced and sophisticated users found EMACS to be eminently more usable than any of the previous forms of editing.”

Bernard S. Greenberg, SM ’74

Then, in 1976, Richard M. Stallman, a researcher at the MIT AI Lab, saw a full-screen editor—called E—on a visit to Stanford’s AI Lab. Inspired, he returned to MIT and set out to improve Control-R. The most important change to the program’s underlying structure: Every key ran its own macro when pressed, making Control-R far easier to customize. The lab’s hackers took to Stallman’s code with gusto and started changing and adding commands. 

That created an issue for Guy Steele Jr., SM ’77, PhD ’80. A graduate student in the lab, Steele frequently needed to help other lab members debug their programs. “I noticed that it was much harder for me to help someone who was using one of these packages rather than straight TECO,” he recalls. “Eventually, it occurred to me to try [to] broker consensus on a standard set of Control-R commands that everyone could agree to use.”

David Moon ’75, another member of the lab, helped out. Stallman jumped in as well, and eventually he took over. Together, the group assigned a standard set of commands that made use of the Meta key found on many of the lab’s early keyboards: Meta-F would move the cursor forward a word, Meta-B would move it back a word, and so on. They called the result EMACS, short for “Editor Macros” or “Editing Macros.” “My goal was not to construct a great new text editor,” says Steele. “I was trying to address a social problem.”

Chat with me