600px-Emacs_Dired_buffers.png

Not to be confused with eMac or Emacs Lisp.

This article is about the class of text editors. For the most popular current example, see GNU Emacs.

Emacs /ˈiːmæks/ or EMACS (Editor MACroS)[3][4][5] is a family of text editors that are characterized by their extensibility.[6] The manual for the most widely used variant,[7] GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor".[8] Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively as of 2020.

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 that provides a deep extension capability, allowing users and developers to write new commands and applications for the editor. Extensions have been written to manage email, files, outlines, and RSS feeds,[9] as well as clones of ELIZA, Pong, Conway's Life, Snake and Tetris.[10]

The original EMACS was written in 1976 by David A. Moon and [Guy L. Steele Jr.](https://en.wikipedia.org/wiki/Guy_L._Steele_Jr.) as a set of Editor MACroS for the TECO editor.[2][3][4][5][11] It was inspired by the ideas of the TECO-macro editors TECMAC and TMACS.[12]

The most popular, and most ported, version of Emacs is GNU Emacs, which was created by Richard Stallman for the GNU Project.[13] 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 inactive.

Emacs is, along with vi, one of the two main contenders in the traditional editor wars of Unix culture. Emacs is among the oldest free and open source projects still under development.[14]

History[edit]

Emacs was started by [Guy L. Steele Jr.](https://en.wikipedia.org/wiki/Guy_L._Steele_Jr.) as a project to unify the many divergent TECO command sets and key bindings at MIT[4]

The interface of Emacs was influenced by the design of the Symbolics space-cadet keyboard[15]

Editing C source code in GNU Emacs

Editing, compiling and executing C++ code from GNU Emacs

Emacs development began during the 1970s at the MIT AI Lab, whose PDP-6 and PDP-10 computers used the Incompatible Timesharing System (ITS) operating system that featured a default line editor known as Tape Editor and Corrector (TECO). 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 ('i') 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 (<esc>) to switch the editor back to command mode. (A similar technique was used to allow overtyping.) This behavior is similar to that of the program ed.

Richard Stallman visited the Stanford AI Lab in 1972 or 1974 and saw the lab's E editor, written by Fred Wright.[16] He was impressed by the editor's intuitive WYSIWYG (What You See Is What You Get) 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.[5]

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 and typically allowed editing on only one page at a time, 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.