Home › Technology › Emacs Turns 50
Technology

Emacs Turns 50

Key Points

EMACS turns 50 How the MIT AI Lab’s text editor gave birth to the free software movement. Programming used to be a very different experience from the one we know today. In fact, the first programmers didn’t write code at all; the six women who worked on the ENIAC, one of the world’s first computers, at the University of Pennsylvania in 1946 did it by physically configuring switches, cables, and plugboards.

EMACS turns 50 How the MIT AI Lab’s text editor gave birth to the free software movement. Programming used to be a very different experience from the one we know today. In fact, the first programmers didn’t write code at all; the six women who worked on the ENIAC, one of the world’s first computers, at the University of Pennsylvania in 1946 did it by physically configuring switches, cables, and plugboards. A few years later, MIT engineers programmed the Whirlwind by punching code onto paper tape that was then loaded into the computer’s memory—making it among the first “stored-program” machines. Later, they and others moved on to punch cards, one for each line of code. 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.” Nevertheless, EMACS was a great new text editor. Whereas Control-R could be tricky, EMACS users with “no technical experience at all” could learn to edit letters, emails, and even programs “within minutes or an hour,” according to a history by Bernard S. Greenberg, SM ’74. Meanwhile, “experienced and sophisticated users found EMACS to be eminently more usable than any of the previous forms of editing.” Stallman started distributing EMACS to anyone who sent him a magnetic tape and a postage-paid return envelope. “EMACS does not cost anything; instead, you are joining the EMACS software-sharing commune,” he wrote in the 1981 manual. “The conditions of membership are that you must send back any improvements you make to EMACS.” Greenberg, meanwhile, decided to write his own version for Multics, an early operating system by that time owned by his employer, Honeywell. Greenberg’s EMACS won first prize at the International Honeywell Software Conference in 1980, and Honeywell started selling it. Honeywell wasn’t alone in marketing a version of EMACS: James Arthur Gosling, a Carnegie Mellon graduate who went on to lead the development of the Java programming language, made a version that he eventually sold as a commercial product. This transition from free to paid software ultimately spurred Stallman to launch a project to create an operating system that could be freely shared and improved by its users. He modeled this effort, called the GNU Project, after the increasingly popular Unix operating system from Bell Labs. “GNU” was short for “GNU’s Not Unix,” alluding to the fact that, unlike Unix, it would be free. The project’s first major application was GNU Emacs (now restyled in lowercase). The GNU/Linux operating system was still years away, so, despite the project’s aim to create an entirely free operating system, GNU Emacs initally ran on Unix. It would eventually run on a range of operating systems, including Linux but also other Unix-based systems. When Apple launched Mac OS X, the first release of its Unix-based operating system, in 2001, GNU Emacs was included. Apple stopped shipping GNU Emacs in 2019, but the company still has a program called mg (“Micro GNU Emacs”). Though it supports most EMACS commands, it lacks an integrated programming language, making it what some call an “ersatz EMACS.” Meanwhile, much of Apple’s OS still has hidden support for EMACS commands. The keyboard has no Meta key, but Control-Option-B will move back one word, and Control-Option-F will move one forward. Keep Reading Most Popular Don’t be fooled—LLMs don’t reason Ten years after AlphaGo’s match against Go champion Lee Sedol, today’s AI still isn’t tapping into the machinery that made that win possible. “We were looking at it wrong”: The explosive claim that’s upended the AI world An exclusive interview with Nick Cammarata, the researcher whose 26,000-word viral blog post has AI safety folks celebrating. Don’t be fooled by this summer of AI hype Breathless claims about AGI and new capabilities fall apart pretty quickly under scrutiny. An AI “mind-reading” tool can reconstruct what you’re looking at from a brain scan Scientists hope it could be used to reconstruct a person’s inner thoughts, mental images, or even dreams. Stay connected Get the latest updates from MIT Technology Review Discover special offers, top stories, upcoming events, and more.
the MIT AI Lab’s (ORG) the University of Pennsylvania (ORG) MIT (ORG) the MIT Artificial Intelligence Laboratory (ORG) Apple (ORG) Mac OS (ORG) X. Beyond (PERSON) EMACS (ORG) GNU (ORG) TECO (ORG) Corrector (ORG) Dan Murphy (PERSON) Carl Mikkelsen (PERSON) Control-R (ORG) Bernard S. Greenberg (PERSON)
Originally published by Hacker News Read original →