Emacs


Emacs, originally named EMACS, is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor". Development of the first Emacs began in the mid-1970s, and work on GNU Emacs, directly descended from the original, is ongoing; its latest version is, released.
Emacs has over 10,000 built-in commands and its user interface allows the user to combine these commands into macros to automate work. Implementations of Emacs typically feature a dialect of the Lisp programming language, allowing users and developers to write new commands and applications for the editor. Extensions have been written to, among other things, manage files, remote access, e-mail, outlines, multimedia, Git integration, RSS feeds, and collaborative editing, as well as implementations of ELIZA, Pong, Conway's Life, Snake, Dunnet, and Tetris.
The original EMACS was written in 1976 by David A. Moon and Guy L. Steele Jr. as a set of macros for the TECO editor. It was inspired by the ideas of the TECO-macro editors TECMAC and TMACS.
The most popular, and most ported, version of Emacs is GNU Emacs, which was created by Richard Stallman for the GNU Project. XEmacs is a variant that branched from GNU Emacs in 1991. GNU Emacs and XEmacs use similar Lisp dialects and are, for the most part, compatible with each other. XEmacs development is currently very slow.
GNU Emacs is, along with vi, one of the two main contenders in the traditional editor wars of Unix culture. GNU Emacs is among the oldest free and open source projects still under development.

History

Emacs development began during the 1970s at the MIT AI Lab, whose PDP-6 and PDP-10 computers used the Incompatible Timesharing System operating system that featured a default line editor known as Text Editor and Corrector. Unlike most modern text editors, TECO used separate modes in which the user would either add text, edit existing text, or display the document. One could not place characters directly into a document by typing them into TECO, but would instead enter a character in the TECO command language telling it to switch to input mode, enter the required characters, during which time the edited text was not displayed on the screen, and finally enter a character to switch the editor back to command mode. This behavior is similar to that of the program ed.
By the 1970s, TECO was already an old program, initially released in 1962. Richard Stallman visited the Stanford AI Lab in 1976 and saw the lab's E editor, written by Fred Wright. He was impressed by the editor's intuitive WYSIWYG behavior, which has since become the default behavior of most modern text editors. He returned to MIT where Carl Mikkelsen, a hacker at the AI Lab, had added to TECO a combined display/editing mode called Control-R that allowed the screen display to be updated each time the user entered a keystroke. Stallman reimplemented this mode to run efficiently and then added a macro feature to the TECO display-editing mode that allowed the user to redefine any keystroke to run a TECO program.
E had another feature that TECO lacked: random-access editing. TECO was a page-sequential editor that was designed for editing paper tape on the PDP-1 at a time when computer memory was generally small due to cost, and it was a feature of TECO that allowed editing on only one page at a time sequentially in the order of the pages in the file. Instead of adopting E's approach of structuring the file for page-random access on disk, Stallman modified TECO to handle large buffers more efficiently and changed its file-management method to read, edit, and write the entire file as a single buffer. Almost all modern editors use this approach.
The new version of TECO quickly became popular at the AI Lab and soon accumulated a large collection of custom macros whose names often ended in MAC or MACS, which stood for macro. Two years later, Guy Steele took on the project of unifying the diverse macros into a single set. Steele and Stallman's finished implementation included facilities for extending and documenting the new macro set. The resulting system was called EMACS, which stood for Editing MACroS or, alternatively, E with MACroS. Later, the use of EMACS as a recursive acronym for EMACS Makes All Computing Simple became popular; this fit in with the growing use of recursive acronyms for other versions of EMACS. Stallman picked the name Emacs "because was not in use as an abbreviation on ITS at the time." An apocryphal hacker koan alleges that the program was named after Emack & Bolio's, a popular Boston ice cream store. The first operational EMACS system existed in late 1976.
Stallman saw a problem in too much customization and de facto forking and set certain conditions for usage. He later wrote:
The original Emacs ran only on the PDP-10 running ITS. Its behavior was sufficiently different from that of TECO that it could be considered a text editor in its own right, and it quickly became the standard editing program on ITS. Mike McMahon ported Emacs from ITS to the TENEX and TOPS-20 operating systems. Other contributors to early versions of Emacs include Kent Pitman, Earl Killian, and Eugene Ciccarelli. By 1979, Emacs was the main editor used in MIT's AI lab and its Laboratory for Computer Science.

Implementations

Early implementations

In the following years, programmers wrote a variety of Emacs-like editors for other computer systems. These included EINE and ZWEI, which were written for the Lisp machine by Mike McMahon and Daniel Weinreb, and Sine, which was written by Owen Theodore Anderson. Weinreb's EINE was the first Emacs written in Lisp. In 1978, Bernard Greenberg wrote Multics Emacs almost entirely in Multics Lisp at Honeywell's Cambridge Information Systems Lab. Multics Emacs was later maintained by Richard Soley, who went on to develop the NILE Emacs-like editor for the NIL Project, and by Barry Margolin. Many versions of Emacs, including GNU Emacs, would later adopt Lisp as an extension language.
James Gosling, who would later invent NeWS and the Java programming language, wrote Gosling Emacs in 1981. The first Emacs-like editor to run on Unix, Gosling Emacs was written in C and used Mocklisp, a language with Lisp-like syntax, as an extension language.
Early ads for Computer Corporation of America's CCA EMACS appeared in 1984.CCA EMACS was originally based on Warren Montgomery's EMACS, but was gradually rewritten so that by the time of its commercial release in 1983, none of Montgomery's code was present anymore. CCA EMACS was written to emulate the original PDP-10 EMACS as closely as possible, while adding many new commands as well. In 1984, in a competition with other versions of Emacs, it won a site license from MIT for their Project Athena.

GNU Emacs

Richard Stallman began work on GNU Emacs in 1984 to produce a free software alternative to the proprietary Gosling Emacs. GNU Emacs was initially based on Gosling Emacs, but Stallman's replacement of its Mocklisp interpreter with a true Lisp interpreter required that nearly all of its code be rewritten. This became the first program released by the nascent GNU Project. GNU Emacs is written in C and provides Emacs Lisp, also implemented in C, as an extension language. Version 13, the first public release, was made on March 20, 1985. The first widely distributed version of GNU Emacs was version 15.34, released later in 1985. Early versions of GNU Emacs were numbered as 1.x.x, with the initial digit denoting the version of the C core. The 1 was dropped after version 1.12, as it was thought that the major number would never change, and thus the numbering skipped from 1 to 13. In September 2014, it was announced on the GNU emacs-devel mailing list that GNU Emacs would adopt a rapid release strategy and version numbers would increment more quickly in the future.
GNU Emacs offered more features than Gosling Emacs, in particular a full-featured Lisp as its extension language, and soon replaced Gosling Emacs as the de facto Unix Emacs editor. Markus Hess exploited a security flaw in GNU Emacs' email subsystem in his 1986 cracking spree in which he gained superuser access to Unix computers.
Most of GNU Emacs functionality is implemented through a scripting language called Emacs Lisp. Because about 70% of GNU Emacs is written in the Emacs Lisp extension language, one only needs to port the C core which implements the Emacs Lisp interpreter. This makes porting Emacs to a new platform considerably less difficult than porting an equivalent project consisting of native code only.
GNU Emacs development was relatively closed until 1999 and was used as an example of the Cathedral development style in The Cathedral and the Bazaar. The project has since adopted a public development mailing list and anonymous CVS access. Development took place in a single CVS trunk until 2008 and was then switched to the Bazaar DVCS. On November 11, 2014, development was moved to Git.
Richard Stallman has remained the principal maintainer of GNU Emacs, but he has stepped back from the role at times. Stefan Monnier and Chong Yidong were maintainers from 2008 to 2015. John Wiegley was named maintainer in 2015 after a meeting with Stallman at MIT. Wiegley stepped down in 2018, leaving Eli Zaretskii as lead maintainer. Stefan Kangas was appointed as co-maintainer in 2023, and Andrea Corallo joined Zaretskii and Kangas in 2024.
As of 2025, GNU Emacs has had 1,608 individual committers throughout its history.

XEmacs

Lucid Emacs, based on an early alpha version of GNU Emacs 19, was developed beginning in 1991 by Jamie Zawinski and others at Lucid Inc. One of the best-known early forks in free software development occurred when the codebases of the two Emacs versions diverged and the separate development teams ceased efforts to merge them back into a single program. Lucid Emacs has since been renamed XEmacs. Its development is currently very slow, with the most recent stable version 21.4.22 released in January 2009, and the most recent beta released in June 2025; meanwhile, GNU Emacs has implemented many formerly XEmacs-only features.