Emacs
Encyclopedia
Emacs is a class of text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

s, usually characterized by their extensibility
Extensibility
In software engineering, extensibility is a system design principle where the implementation takes into consideration future growth. It is a systemic measure of the ability to extend a system and the level of effort required to implement the extension...

. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.

Development began in the mid-1970s and continues actively . The most popular version of Emacs is GNU Emacs, a part of the GNU Project
GNU Project
The GNU Project is a free software, mass collaboration project, announced on September 27, 1983, by Richard Stallman at MIT. It initiated GNU operating system development in January, 1984...

, which is commonly referred to simply as “Emacs”.

The GNU Emacs manual describes it as “the extensible, customizable, self-documenting, real-time display editor.” It is also the most ported of the implementations of Emacs. , the latest stable release of GNU Emacs is version 23.3.

Aside from GNU Emacs, another version of Emacs in common use, XEmacs
XEmacs
XEmacs is a graphical- and console-based text editor which runs on almost any Unix-like operating system as well as Microsoft Windows. XEmacs is a fork, based on a version of GNU Emacs from the late 1980s...

, forked
Fork (software development)
In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software...

 from GNU Emacs in 1991. XEmacs has remained mostly compatible and continues to use the same extension language, Emacs Lisp
Emacs Lisp
Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C...

, as GNU Emacs. Large parts of GNU Emacs and XEmacs are written in Emacs Lisp, so the extensibility of Emacs' features is deep.

The original EMACS consisted of a set of Editor MACroS for the TECO
Text Editor and Corrector
TECO is a text editor originally developed at the Massachusetts Institute of Technology in the 1960s, after which it was modified by 'just about everybody'...

 editor. It was written in 1976 by Richard Stallman
Richard Stallman
Richard Matthew Stallman , often shortened to rms,"'Richard Stallman' is just my mundane name; you can call me 'rms'"|last= Stallman|first= Richard|date= N.D.|work=Richard Stallman's homepage...

, initially together with Guy L. Steele, Jr.
Guy L. Steele, Jr.
Guy Lewis Steele Jr. , also known as "The Great Quux", and GLS , is an American computer scientist who has played an important role in designing and documenting several computer programming languages.-Biography:...

 It was inspired by the ideas of TECMAC and TMACS, a pair of TECO-macro editors written by Steele, Dave Moon, Richard Greenblatt
Richard Greenblatt (programmer)
Richard D. Greenblatt is an American computer programmer. Along with Bill Gosper, he may be considered to have founded the hacker community, and holds a place of distinction in the Lisp and the MIT AI Lab communities.-Childhood:...

, Charles Frankston, and others.

In Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 culture, Emacs became one of the two main contenders in the traditional editor war
Editor war
Editor war is the common name for the rivalry between users of the vi and Emacs text editors. The rivalry has become a lasting part of hacker culture and the free software community....

s, the other being vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

. The word "emacs" is often pluralized as emacsen, by analogy with boxen (itself used by analogy with oxen) and VAXen.

History

Emacs development began at the MIT AI Lab during the 1970s. Before its introduction, the Incompatible Timesharing System
Incompatible Timesharing System
ITS, the Incompatible Timesharing System , was an early, revolutionary, and influential time-sharing operating system from MIT; it was developed principally by the Artificial Intelligence Laboratory at MIT, with some help from Project MAC.In addition to being technically influential ITS, the...

 (ITS), the operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 on the AI Lab's PDP-6
PDP-6
The PDP-6 was a computer model developed by Digital Equipment Corporation in 1963. It was influential primarily as the prototype for the later PDP-10; the instruction sets of the two machines are almost identical.The PDP-6 was DEC's first "big" machine...

 and PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

 computers, featured a default line editor
Line editor
A line editor is a text editor computer program that manipulates text primarily by the display, modification, and movement of lines. Line editors precede screen-based text editors and originated in an era when a computer operator typically interacted with a teleprinter , with no video display, and...

 known as Tape Editor and Corrector
Text Editor and Corrector
TECO is a text editor originally developed at the Massachusetts Institute of Technology in the 1960s, after which it was modified by 'just about everybody'...

 (TECO) (later changed to Text Editor and Corrector
Text Editor and Corrector
TECO is a text editor originally developed at the Massachusetts Institute of Technology in the 1960s, after which it was modified by 'just about everybody'...

, the ‘tape’ referring to paper tape). Unlike most modern text editors, TECO has separate modes which the user used to either add text, edit existing text, or display the document. Typing characters into TECO did not place those characters directly into a document; one had to write a series of instructions in the TECO command language telling it to enter the required characters, during which time the edited text was not displayed on the screen. This behavior is similar to the program ed.

Richard Stallman
Richard Stallman
Richard Matthew Stallman , often shortened to rms,"'Richard Stallman' is just my mundane name; you can call me 'rms'"|last= Stallman|first= Richard|date= N.D.|work=Richard Stallman's homepage...

 visited the Stanford AI Lab in 1972 or 1974 and saw the lab’s “E” editor, written by Fred Wright. The editor had an intuitive WYSIWYG
WYSIWYG
WYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...

 (What You See Is What You Get) behavior as used almost universally by modern text editors, which impressed Stallman. He returned to MIT where Carl Mikkelsen, a hacker at the AI Lab, had added a combined display+editing mode called “Control-R” to TECO, allowing the screen display to be updated each time the user entered a keystroke. Stallman reimplemented this mode to run efficiently, then added a macro feature to the TECO display-editing mode, allowing the user to redefine any keystroke to run a TECO program.

E had another feature which TECO lacked: random-access editing. Since TECO's original implementation was designed for editing paper tape on the PDP-1
PDP-1
The PDP-1 was the first computer in Digital Equipment Corporation's PDP series and was first produced in 1960. It is famous for being the computer most important in the creation of hacker culture at MIT, BBN and elsewhere...

, it was a page-sequential editor. Typical editing could only be done on one page at a time, in the order of the pages in the file. To provide random access in Emacs, Stallman decided not to adopt E’s approach of structuring the file for page-random access on disk, but instead modified TECO to handle large buffers more efficiently, and then 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 there accumulated a large collection of custom macros, whose names often ended in “MAC” or “MACS”, which stood for “macro”. Two years later, Guy Steele
Guy L. Steele, Jr.
Guy Lewis Steele Jr. , also known as "The Great Quux", and GLS , is an American computer scientist who has played an important role in designing and documenting several computer programming languages.-Biography:...

 took on the project of unifying the overly diverse macros into a single set. After one night of joint hacking by Steele and Stallman, the latter finished the implementation, which included facilities for extending and documenting the new macro set. The resulting system was called EMACS, which stood for “Editing MACroS”. An alternative version is that EMACS stood for “E with MACroS”, a dig at E’s lack of a macro capability. According to Stallman, he picked the name Emacs “because was not in use as an abbreviation on ITS at the time.” (It has also been noted that “Emack & Bolio's
Emack & Bolio's
Emack & Bolio's is a chain of ice cream stores based in Boston, Massachusetts, United States. The chain was founded by Robert Rook, a lawyer and self-declared hippie who has worked closely with the homeless, Vietnam war protesters, civil and gay rights advocates, and numerous rock bands such as...

” was the name of a popular ice cream store in Cambridge
Cambridge, Massachusetts
Cambridge is a city in Middlesex County, Massachusetts, United States, in the Greater Boston area. It was named in honor of the University of Cambridge in England, an important center of the Puritan theology embraced by the town's founders. Cambridge is home to two of the world's most prominent...

, within walking distance of MIT. A text-formatting program used on ITS was later named BOLIO by Dave Moon, who frequented that store. However, Stallman did not like that ice cream, and did not even know of it when choosing the name “Emacs”; this ignorance is the basis of a hacker koan
Hacker koan
Out of hacker culture, and especially the artificial intelligence community at MIT, there have sprung a number of humorous short stories about computer science dubbed hacker koans; most of these are recorded in an appendix to the Jargon File, where they are called AI Koans...

, Emacs and Bolio).

According to Stallman, 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:
“EMACS was distributed on a basis of communal sharing, which means all improvements must be given back to me to be incorporated and distributed.”


The original Emacs, like TECO, ran only on the PDP line of computers. It behaved sufficiently differently from TECO to be considered a text editor in its own right. It quickly became the standard editing program on ITS. It was also ported
Porting
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...

 from ITS to the Tenex
TOPS-20
The TOPS-20 operating system by Digital Equipment Corporation was the second proprietary OS for the PDP-10 mainframe computer. TOPS-20 began in 1969 as the TENEX operating system of Bolt, Beranek and Newman...

 and TOPS-20
TOPS-20
The TOPS-20 operating system by Digital Equipment Corporation was the second proprietary OS for the PDP-10 mainframe computer. TOPS-20 began in 1969 as the TENEX operating system of Bolt, Beranek and Newman...

 operating systems by Michael McMahon, but not Unix, initially. Other contributors to early versions of Emacs include Kent Pitman
Kent Pitman
Kent M. Pitman is the President of and has been involved for many years in the design, implementation and use of Lisp and Scheme systems. He is often better known by his initials KMP.Kent Pitman is the author of the Common Lisp Condition System...

, Earl Killian, and Eugene Ciccarelli. By 1979, Emacs was the editor used by most people in MIT's AI lab and its Computer Science lab.

Other early implementations

Programmers wrote many Emacs-like editors in the following years for other computer systems, including SINE (Sine is not EMACS), EINE
EINE
EINE was the Emacs text editor for Lisp machines. It was developed by Daniel Weinreb and Mike McMahon in the late 1970s, with a command set the same as the original Emacs written in TECO by Richard Stallman...

 (“EINE Is Not EMACS”) and ZWEI
ZWEI
ZWEI was an early Emacs-like text editor written by Daniel Weinreb and Mike McMahon for the Lisp machine. It is the successor of the editor EINE . Innovations by it include programmability in Lisp, and a new and more flexible method of internally representing buffers...

 (“ZWEI Was EINE Initially”), for the Lisp machine
Lisp machine
Lisp machines were general-purpose computers designed to efficiently run Lisp as their main software language. In a sense, they were the first commercial single-user workstations...

, which were written by Michael McMahon and Daniel Weinreb
Daniel Weinreb
Daniel L. Weinreb is a programmer and computer scientist. He attended MIT 1975–1979, graduating with a B.S. in Computer Science and Electrical Engineering, where he wrote EINE, the text editor for the MIT Lisp Machine. EINE made use of the window system of the Lisp Machine, and thus is the first...

. Weinreb's EINE
EINE
EINE was the Emacs text editor for Lisp machines. It was developed by Daniel Weinreb and Mike McMahon in the late 1970s, with a command set the same as the original Emacs written in TECO by Richard Stallman...

 was the first Emacs written in Lisp. In 1978, Bernard Greenberg
Bernard Greenberg
Bernard S. Greenberg is a programmer and computer scientist, known for his work on Multics and the Lisp machine.-Projects:In 1978, Greenberg implemented Multics Emacs using Multics Maclisp...

 wrote Multics Emacs
Multics Emacs
Multics Emacs was an implementation of the Emacs text editor written in Maclisp by Bernard Greenberg at Honeywell's Cambridge Information Systems Lab. User-supplied extensions were also written in the Lisp programming language. The choice in 1978 of Lisp provided more extensibility than ever...

 almost entirely in Multics Lisp at Honeywell
Honeywell
Honeywell International, Inc. is a major conglomerate company that produces a variety of consumer products, engineering services, and aerospace systems for a wide variety of customers, from private consumers to major corporations and governments....

's Cambridge Information Systems Lab; it was later maintained by Richard Soley
Richard Soley
Dr. Richard Mark Soley is the chair and CEO of Object Management Group, Inc. ; as such, the vision and direction of the consortium are his responsibility...

 (who went on to develop the NILE Emacs-like editor for the NIL Project) and Barry Margolin. Many versions of Emacs, including GNU Emacs, later adopted Lisp as an extension language.

James Gosling
James Gosling
James A. Gosling, OC is a computer scientist, best known as the father of the Java programming language.-Education and career:In 1977, Gosling received a B.Sc in Computer Science from the University of Calgary...

 (who later invented NeWS
NeWS
NeWS was a windowing system developed by Sun Microsystems in the mid 1980s. Originally known as "SunDew", its primary authors were James Gosling and David S. H. Rosenthal...

 and the Java programming language
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

) wrote the first Emacs-like editor to run on Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

: Gosling Emacs
Gosling Emacs
Gosling Emacs was an Emacs implementation written in 1981 by James Gosling in C. Its extension language, Mocklisp, has a syntax that appears similar to Lisp, but Mocklisp does not have lists or any other structured datatypes...

, in 1981. It was written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and, notably, used a language with Lisp-like syntax known as Mocklisp
Mocklisp
Mocklisp is the extension language of Gosling Emacs. While resembling Lisp in many ways, it is semantically quite different. Richard Stallman characterized it as a programming language that "looks syntactically like Lisp, but didn't have the data structures of Lisp. So programs were not data, and...

 as an extension language. In 1984 it was proprietary software
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...

.

GNU Emacs

In 1984, Stallman began working on GNU Emacs to produce a free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 alternative to Gosling Emacs; initially he based it on Gosling Emacs, but he replaced the Mocklisp interpreter at its heart with a true Lisp interpreter, which entailed replacing nearly all of the code. It became the first program released by the nascent GNU project
GNU Project
The GNU Project is a free software, mass collaboration project, announced on September 27, 1983, by Richard Stallman at MIT. It initiated GNU operating system development in January, 1984...

. GNU Emacs is written in C and provides Emacs Lisp
Emacs Lisp
Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C...

 (itself 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 15.34, which appeared later in 1985. Versions 2 to 12 never existed. Earlier versions of GNU Emacs had been numbered "1.x.x", but sometime after version 1.12 the decision was made to drop the "1", as it was thought the major number would never change.

GNU Emacs was later ported to Unix. Since it had more features than Gosling Emacs, in particular a full-featured Lisp as extension language, it soon replaced Gosling Emacs as the de facto Emacs editor on Unix. A security flaw in GNU Emacs' email subsystem was exploited by Markus Hess
Markus Hess
Markus Hess, a German citizen, is best known for his endeavours as a hacker in the late 1980s. Hess was recruited by the KGB to be an international spy with the objective of securing U.S...

 in his 1986 hacking spree to gain superuser
Superuser
On many computer operating systems, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator or supervisor....

 access to Unix computers.

Until 1999, GNU Emacs development was relatively closed, to the point where it was used as an example of the “Cathedral” development style in The Cathedral and the Bazaar
The Cathedral and the Bazaar
The Cathedral and the Bazaar is an essay by Eric S. Raymond on software engineering methods, based on his observations of the Linux kernel development process and his experiences managing an open source project, fetchmail. It examines the struggle between top-down and bottom-up design...

. The project has since adopted a public development mailing list and anonymous CVS
Concurrent Versions System
The Concurrent Versions System , also known as the Concurrent Versioning System, is a client-server free software revision control system in the field of software development. Version control system software keeps track of all work and all changes in a set of files, and allows several developers ...

 access. Development took place in a single CVS trunk until 2008, and today uses the Bazaar DVCS.

Richard Stallman
Richard Stallman
Richard Matthew Stallman , often shortened to rms,"'Richard Stallman' is just my mundane name; you can call me 'rms'"|last= Stallman|first= Richard|date= N.D.|work=Richard Stallman's homepage...

 remained the maintainer of GNU Emacs through most of the time, but took several breaks. The latest one persists and started 2008, when maintenance was handed over to Stefan Monnier and Chong Yidong.

Release history

Version Release date Significant changes
24.1 TBA Emacs Lisp Package Archive, Themes, GTK+3, support for bi-directional input
23.3 March 10, 2011 Improved functionality for using Emacs with version control systems.
23.2 May 8, 2010 New tools for using Emacs as an IDE
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

, including navigation across a project and automatic Makefile generation. New major mode for editing JavaScript source. The mouse is hidden while the user is typing.
23.1 July 29, 2009 Xft
Xft
Xft, the X FreeType interface library, is a free computer program library written by Keith Packard. As of version 2.1, it is licensed under a quasi-BSD license....

 support (anti-aliased fonts are now supported on X
X Window System
The X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...

 ), better Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 support, new modes and packages for viewing PDF and PostScript
PostScript
PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

 files (Doc-view mode), connecting to processes through D-Bus
D-Bus
In computing, D-Bus is a simple inter-process communication open-source system for software applications to communicate with one another. Heavily influenced by KDE2–3's DCOP system, D-Bus has replaced DCOP in the KDE 4 release. An implementation of D-Bus supports most POSIX operating...

 (dbus), connecting to the GNU Privacy Guard
GNU Privacy Guard
GNU Privacy Guard is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP...

 (EasyPG), editing XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 documents (nXML mode), editing Ruby
Ruby
A ruby is a pink to blood-red colored gemstone, a variety of the mineral corundum . The red color is caused mainly by the presence of the element chromium. Its name comes from ruber, Latin for red. Other varieties of gem-quality corundum are called sapphires...

 programs (Ruby mode), and more. On Mac OS X, the use of the Carbon GUI libraries was replaced by use of the more modern Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

 GUI libraries.
22.3 September 5, 2008 GTK+ toolkit support, enhanced mouse support, a new keyboard macro system, improved Unicode support, and drag-and-drop operation on X, plus many new modes and packages including a graphical user interface to GDB, Python mode, the mathematical tool Calc, and the remote file editing system Tramp ("Transparent Remote (file) Access, Multiple Protocol").
22.2 March 26, 2008 New support for the Bazaar, Mercurial, Monotone, and Git version control systems
New major modes for editing CSS, Vera, Verilog, and BibTeX style files
Improved scrolling support in Image mode
22.1 June 2, 2007 Support for the GTK+ graphical toolkit
Support for Drag-and-drop on X
Support for images, toolbar, and tooltips
Unicode support
Support for Mac OS X Carbon
Carbon (API)
Carbon is one of Apple Inc.'s procedural application programming interfaces for the Macintosh operating system. It provides C programming language access to Macintosh system services...

 UI
21.1 October 20, 2001 Support for displaying colors and some other attributes on terminals
Built-in horizontal scrolling
Sound support
Wheel mouse support
Improved menu-bar layout
20.1 September 17, 1997 Multi-lingual support
19.28 November 1, 1994 Support for multiple frames using the X Windowing System
New interface for version control systems, called VC
New hexl mode, which is a hexadecimal editing mode
18.24 October 2, 1986
17.36 December 20, 1985 Backup file version numbers
16.56 July 15, 1985
15.10 April 11, 1985
13.0? March 20, 1985

XEmacs

Beginning in 1991, Jamie Zawinski
Jamie Zawinski
Jamie Zawinski , commonly known as jwz, is a former professional American computer programmer responsible for significant contributions to the free software projects Mozilla and XEmacs, and early versions of the Netscape Navigator web browser...

 and others at Lucid Inc. developed Lucid Emacs, based on an early alpha version of GNU Emacs 19. The codebases soon diverged, and the separate development teams gave up trying to merge them back into a single program. This was one of the most famous early forks
Fork (software development)
In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software...

 of a free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 program. Lucid Emacs has since been renamed XEmacs
XEmacs
XEmacs is a graphical- and console-based text editor which runs on almost any Unix-like operating system as well as Microsoft Windows. XEmacs is a fork, based on a version of GNU Emacs from the late 1980s...

; it remains the second most popular variety of Emacs, after GNU Emacs.

Other forks and clones

Many other derivatives of the GNU Emacs have emerged, such as a Japanese version for MS Windows called Meadow
Meadow (programming)
Meadow is an open source programming project to port the popular GNU Emacs text editor for UNIX-based operating systems to Microsoft Windows with some added functions...

, Steve Youngs' fork of XEmacs called SXEmacs
SXEmacs
SXEmacs is a fork of the XEmacs text editor.It runs on many Unix-like operating systems, and is notable for features such as FFI support, enhanced number types , raw string regexps, and an implementation of Pugh's skip lists...

, and a version which focuses on integrating with the Apple Macintosh user interface called Aquamacs
Aquamacs
Aquamacs is an Emacs text editor for Mac OS X. It is based on GNU Emacs from the GNU project, currently tracking the version 23 branch, although its user interface is designed to conform with Mac OS X UI standards....

.

Emacs clones, not based on GNU Emacs source code, have proliferated. One motivation for writing clones was that GNU Emacs was initially targeted at computers with a 32-bit flat address space, and at least 1 MiB
Mebibyte
The mebibyte is a multiple of the unit byte for digital information. The binary prefix mebi means 220, therefore 1 mebibyte is . The unit symbol for the mebibyte is MiB. The unit was established by the International Electrotechnical Commission in 2000 and has been accepted for use by all major...

 of RAM. At a time when such computers were considered high end, this left an opening for smaller reimplementations. Some notable modern clones include:
  • MicroEMACS
    MicroEMACS
    MicroEMACS is a small, portable Emacs-like text editor originally written by Dave Conroy in 1985, and further developed and maintained by Daniel M. Lawrence...

    , originally written by Dave Conroy and further developed by Daniel Lawrence, which exists in many variations.
  • mg
    Mg (editor)
    mg, originally called MicroGnuEmacs, , is a public-domain text editor that runs on Unix-like operating systems. It is based on MicroEMACS, but intended to more closely resemble GNU Emacs while still maintaining a small memory footprint and fast speed...

    , originally called MicroGNUEmacs (and later mg2a), a public-domain offshoot of MicroEMACS intended to more closely resemble GNU Emacs. Now installed by default on OpenBSD
    OpenBSD
    OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

    .
  • NotGNU, a small, fast, freeware implementation for DOS, Win16, Win32 and GNU/Linux by Julie Melbin.
  • JOVE
    JOVE
    JOVE is an open-source, Emacs-like text editor, primarily intended for Unix-like operating systems. It also supports MS-DOS and Microsoft Windows. JOVE was inspired by Gosling Emacs but is much smaller and simpler, lacking Mocklisp...

     (Jonathan's Own Version of Emacs), a non-programmable Emacs implementation for UNIX-like
    Unix-like
    A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

     systems by Jonathan Payne.
  • Freemacs
    Freemacs
    Freemacs is a small, programmable computer text editor for MS-DOS with some degree of compatibility with GNU Emacs. Written by Russ Nelson and later maintained by Jim Hall, Freemacs is currently distributed under the GPL in the FreeDOS project....

    , a DOS
    DOS
    DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

     version with an extension language based on text macro expansion, all within the original 64 KiB
    Kibibyte
    The kibibyte is a multiple of the unit byte for quantities of digital information. The binary prefix kibi means 1024; therefore, 1 kibibyte is . The unit symbol for the kibibyte is KiB. The unit was established by the International Electrotechnical Commission in 1999 and has been accepted for use...

     flat memory limit.
  • MINCE (MINCE Is Not Complete Emacs), a version for CP/M
    CP/M
    CP/M was a mass-market operating system created for Intel 8080/85 based microcomputers by Gary Kildall of Digital Research, Inc...

     and later, for DOS
    DOS
    DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

     from Mark of the Unicorn
    Mark of the Unicorn
    Mark of the Unicorn is a music-related computer software and hardware supplier. It is based in Cambridge, Massachusetts and has created music software since 1984.Products by MOTU include:*Digital Performer*AudioDesk*BPM*MachFive*MX4*Unisyn...

    . MINCE evolved into Final Word, which eventually became the Sprint
    Sprint (word processor)
    Sprint was a powerful and programmable text-based word processor for DOS, first published by Borland in 1987.__FORCETOC__- History :Sprint originally appeared as the "FinalWord" application, developed by Jason Linhart, Craig Finseth, Scott Layson Burson, Brian Hess, and Bill Spitzak at Mark of the...

     word processor from Borland.
  • Zile
    Zile (editor)
    Zile is a free software Emacs-like UNIX text editor. Written by Sandro Sigala and later maintained by Reuben Thomas, Zile's goal is to be similar to GNU Emacs but with a very small size. In the tradition of recursive acronyms, Zile stands for Zile Is Lossy Emacs...

     - (Zile is lossy Emacs)
  • Climacs
    Climacs
    Climacs is an open source text editor written in Common Lisp that is similar to GNU Emacs and is released under the GNU LGPL software license. Climacs uses the Common Lisp Interface Manager and ESA for constructing its user interface. McCLIM is the CLIM implementation that is compatible with...

    , an Emacs-variant implemented in Common Lisp
    Common Lisp
    Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

     and more influenced by Zmacs
    Zmacs
    Zmacs is one of the many variants of the Emacs text editor. Zmacs was written for the MIT Lisp machine and runs on its descendants . Zmacs is written in Lisp Machine Lisp...

     than GNU Emacs.
  • Yi
    Yi (editor)
    Yi is a text editor written and extensible in Haskell. The goal of Yi is to provide a flexible, powerful and correct editor core dynamically scriptable in Haskell....

    , an editor written and extensible in Haskell
    Haskell (programming language)
    Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...

     having an emulation mode for Emacs.
  • QEmacs, small editor by Fabrice Bellard
    Fabrice Bellard
    Fabrice Bellard is a computer programmer who is best known as the creator of the FFmpeg and QEMU software projects. He has also developed a number of other programs, including the Tiny C Compiler....

     with UTF-8 support and support for fast editing of large files (hundreds of MiB).
  • Epsilon (text editor), an Emacs clone by Lugaru Software. Versions for DOS, Windows, GNU/Linux, FreeBSD, Mac OS X and O/S 2 are bundled in the release. Notable for a non-lisp extension language with C syntax, and a very early concurrent command shell buffer implementation under the single tasking MS-DOS.
  • Joe's Own Editor
    Joe's Own Editor
    JOE or Joe's Own Editor is a terminal-based text editor for Unix systems, available under the GPL. It is designed to be easy to use.JOE is distributed in most major Linux distributions and open-source BSD systems.- Description of features :...

     has an emulation mode for emacs.
  • e3 has an emulation mode for emacs.
  • JED
    JED (text editor)
    JED is a text editor that makes extensive use of the S-Lang library. It is highly cross-platform compatible; JED runs on Windows and all flavors on Linux and Unix. Older versions are available for DOS. It is also very lightweight , which makes it an ideal editor for older systems, embedded systems,...

     has an emulation mode for emacs.
  • PceEmacs is the editor for SWI-Prolog
    SWI-Prolog
    SWI-Prolog is an open source implementation of the programming language Prolog, commonly used for teaching and semantic web applications.It has a rich set of features, libraries forconstraint logic programming,multithreading,unit testing,GUI,...

     that is based on Emacs.

Licensing

The terms of the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 (GPL) claim that the Emacs source code, including both the C and Emacs Lisp components, are freely available for examination, modification, and redistribution.

For GNU Emacs (and many other GNU packages), it remains policy to accept significant code contributions only if the copyright
Copyright
Copyright is a legal concept, enacted by most governments, giving the creator of an original work exclusive rights to it, usually for a limited time...

 holder executes a suitable disclaimer or assignment of their copyright interest to the Free Software Foundation
Free Software Foundation
The Free Software Foundation is a non-profit corporation founded by Richard Stallman on 4 October 1985 to support the free software movement, a copyleft-based movement which aims to promote the universal freedom to create, distribute and modify computer software...

, although one exception to this policy occurred in the case of MULE
MULE
MULE is the MULtilingual Enhancement to GNU Emacs.MULE provides facilities not only for handling text written in many different languages , but in fact multilingual texts containing several languages in the same buffer...

 (MULtilingual Extension, which handles Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 and more advanced methods of dealing with other languages' scripts) code, since the copyright holder (the Japanese government) could not assign copyright. This does not apply to extremely minor code contributions of less than 10 lines, or to bug fixes. This policy is in place so that FSF can defend the software in court if its copyleft
Copyleft
Copyleft is a play on the word copyright to describe the practice of using copyright law to offer the right to distribute copies and modified versions of a work and requiring that the same rights be preserved in modified versions of the work...

 licence is violated.

Older versions of the GNU Emacs documentation appeared under an ad-hoc license which required the inclusion of certain text in any modified copy. In the GNU Emacs user's manual, for example, this included how to obtain GNU Emacs and Richard Stallman's essay The GNU Manifesto
GNU Manifesto
The GNU Manifesto was written by Richard Stallman and published in March 1985 in Dr. Dobb's Journal of Software Tools as an explanation and definition of the goals of the GNU Project, and to call for participation and support. It is held in high regard within the free software movement as a...

. The XEmacs manuals, which were inherited from older GNU Emacs manuals when the fork occurred, have the same license. Newer versions of the documentation use the GNU Free Documentation License
GNU Free Documentation License
The GNU Free Documentation License is a copyleft license for free documentation, designed by the Free Software Foundation for the GNU Project. It is similar to the GNU General Public License, giving readers the rights to copy, redistribute, and modify a work and requires all copies and...

 and makes use of "invariant sections" to require the inclusion of the same documents, additionally requiring that the manuals proclaim themselves as GNU Manuals.

Features

Emacs is primarily a text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

, not a word processor
Word processor
A word processor is a computer application used for the production of any sort of printable material....

; it concentrates on manipulating pieces of text, rather than manipulating the typeface
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

 (the "font") of the characters or printing documents (though Emacs can do these as well). Emacs provides commands to manipulate words and paragraph
Paragraph
A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. The start of a paragraph is indicated by beginning on a new line. Sometimes the first line is indented...

s (deleting them, moving them, moving through them, and so forth), syntax highlighting
Syntax highlighting
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...

 for making source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 easier to read, and "keyboard macros" for performing arbitrary batches of editing commands defined by the user.

GNU Emacs is a "real-time display" editor in that edits get displayed on the screen as they occur. This is standard behaviour for modern text editors.

Customizability

Almost all of the functionality in the GNU Emacs editor, ranging from basic editing operations such as the insertion of characters into a document to the configuration of the user interface, comes under the control of a dialect of the Lisp programming language
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

 known as Emacs Lisp
Emacs Lisp
Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C...

. This unique and unusual design provides many of the features found in Emacs. In this Lisp environment, variables
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 and even entire functions
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 can be modified without having to recompile or even restart the editor.

Users have three primary ways of customizing Emacs:
  1. the customize extension, which allows the user to set common customization variables, such as the colour scheme, using a graphical interface, etc. This is intended for Emacs beginners who do not want to work with Emacs Lisp code.
  2. collecting keystrokes into macros and replaying them to automate complex, repetitive tasks. This is often done on an ad-hoc basis, with each macro discarded after use, although macros can be saved and invoked later.
  3. using Emacs Lisp. Usually, user-supplied Emacs Lisp code is stored in a file called .emacs and loaded when Emacs starts up. The .emacs file is often used to set variables and key bindings
    Keyboard shortcut
    In computing, a keyboard shortcut is a finite set of one or more keys that invoke a software or operating system operation when triggered by the user. A meaning of term "keyboard shortcut" can vary depending on software manufacturer...

     different from the default setting, and to define new commands that the user finds convenient. Many advanced users have .emacs files hundreds of lines long, with idiosyncratic customizations that cause Emacs to diverge wildly from the default behavior.

Extensibility

As a result, the behavior of Emacs can be modified almost without limit, either directly by the user, or by loading Emacs Lisp code known variously as "libraries", "packages", or "extensions".

Emacs contains a large number of Emacs Lisp libraries, and users can find more "third-party" libraries on the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

. Emacs can be used as an Integrated Development Environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 (IDE), allowing programmers to edit, compile
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

, and debug
Debugging
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge...

 their code within a single interface. Other libraries perform more unusual functions. A few examples include:
  • AUCTeX
    AUCTeX
    AUCTeX is an extensible package for writing and formatting...

    , a suite of extensions that facilitate the creation of TeX
    TeX
    TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

     and LaTeX
    LaTeX
    LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

     documents
  • Calc, a powerful RPN
    Reverse Polish notation
    Reverse Polish notation is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed...

     numerical calculator
    Calculator
    An electronic calculator is a small, portable, usually inexpensive electronic device used to perform the basic operations of arithmetic. Modern calculators are more portable than most computers, though most PDAs are comparable in size to handheld calculators.The first solid-state electronic...

  • Calendar-mode, for keeping appointment calendars and diaries
  • Dissociated Press
    Dissociated press
    Dissociated press is an algorithm for generating text based on another text. It is intended for transforming any text into potentially humorous garbage. The name is a play on "Associated Press".An implementation of the algorithm is available in Emacs....

    , a Racter
    Racter
    Racter was an artificial intelligence computer program that generated English language prose at random.-History:The name of the program is short for raconteur. The sophistication claimed for the program was likely exaggerated, as could be seen by investigation of the template system of text...

    -like text generator.
  • Dunnet
    Dunnet (game)
    Dunnet is a text adventure written by Ron Schnell in 1983. The game enjoys certain popularity because since 1992 it is part of the default packages in many of the Emacs versions. The word Dunnet is derived from the first three letters of dungeon and the last three letters of Arpanet...

    , a text adventure
    Interactive fiction
    Interactive fiction, often abbreviated IF, describes software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives and as video games. In common usage, the term refers to text...

  • Ediff and Emerge, for comparing and combining files interactively.
  • Emacs/W3
    Emacs/W3
    Emacs/W3 is a text-based web browser for the GNU Emacs text editor, written primarily by William M. Perry and entirely in GNU Emacs Lisp. Emacs/W3 is part of the Sumo package for XEmacs, and the submodule for fetching an URL is currently part of the GNU Emacs CVS repository.As by the maintainer,...

    , a web browser
    Web browser
    A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

  • ERC
    ERC (software)
    ERC is a software package written in Emacs Lisp that enables the Emacs editor to act as an Internet Relay Chat client.It is an official GNU project, and is part of GNU Emacs...

     and rcirc
    Rcirc
    rcirc is an Internet Relay Chat client written in Emacs Lisp. It is one of two IRC clients included in GNU Emacs since release 22.1, alongside ERC....

    , IRC
    Internet Relay Chat
    Internet Relay Chat is a protocol for real-time Internet text messaging or synchronous conferencing. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file...

     clients (22.1)
  • Gnus
    Gnus
    Gnus is a message reader running under GNU Emacs and XEmacs. It supports reading and composing both news and e-mail.Gnus blurs the distinction between news and e-mail, treating them both as "articles" that come from different sources. News articles are kept separate by group, and e-mail can be...

    , a full-featured newsreader
    News client
    A newsreader is an application program that reads articles on Usenet . Newsreaders act as clients which connect to a news server, via the Network News Transfer Protocol , to download articles and post new articles...

     and email client (and early evidence for Zawinski's Law, along with Rmail)
  • MULE
    MULE
    MULE is the MULtilingual Enhancement to GNU Emacs.MULE provides facilities not only for handling text written in many different languages , but in fact multilingual texts containing several languages in the same buffer...

    , MultiLingual extensions to Emacs, allowing editing text written in multiple languages, somewhat analogous to Unicode
    Unicode
    Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

  • Org-mode
    Org-mode
    Org-mode is an editing mode in the text editor Emacs which supports the editing of plain text hierarchical documents. It has specific support for a number of different use cases, such as writing to-do lists, project planning, and writing web pages...

     for keeping notes, maintaining lists (to-do lists and other types of lists) and doing project planning and measuring
  • Info
    Texinfo
    Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form with a single source file...

    , an online help-browser
  • Planner, a personal information manager
    Personal information manager
    A personal information manager is a type of application software that functions as a personal organizer. The acronym PIM is now, more commonly, used in reference to Personal information management as a field of study...

  • SES, a spreadsheet
    Spreadsheet
    A spreadsheet is a computer application that simulates a paper accounting worksheet. It displays multiple cells usually in a two-dimensional matrix or grid consisting of rows and columns. Each cell contains alphanumeric text, numeric values or formulas...

  • VM (View Mail), another full-featured email client
  • Wanderlust, yet another full-featured email and news client


Many third-party libraries exist on the Internet; for example, there is a library called wikipedia-mode for editing Wikipedia articles. There is even a Usenet
Usenet
Usenet is a worldwide distributed Internet discussion system. It developed from the general purpose UUCP architecture of the same name.Duke University graduate students Tom Truscott and Jim Ellis conceived the idea in 1979 and it was established in 1980...

 newsgroup
Newsgroup
A usenet newsgroup is a repository usually within the Usenet system, for messages posted from many users in different locations. The term may be confusing to some, because it is usually a discussion group. Newsgroups are technically distinct from, but functionally similar to, discussion forums on...

, [news://gnu.emacs.sources gnu.emacs.sources], which is used for posting new libraries. Some third-party libraries eventually make their way into Emacs, thus becoming a "standard" library.

Performance

On the systems in which Emacs was first implemented, Emacs often ran noticeably slower than rival text editors, because its Lisp-based design incurs a performance overhead resulting from loading and interpreting
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 the Lisp code. Several joke backronym
Backronym
A backronym or bacronym is a phrase constructed purposely, such that an acronym can be formed to a specific desired word. Backronyms may be invented with serious or humorous intent, or may be a type of false or folk etymology....

s allude to this: Eight Megabyte
Megabyte
The megabyte is a multiple of the unit byte for digital information storage or transmission with two different values depending on context: bytes generally for computer memory; and one million bytes generally for computer storage. The IEEE Standards Board has decided that "Mega will mean 1 000...

s And Constantly Swapping
Paging
In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called...

(from the days when eight megabytes was a lot of memory), Emacs Makes A Computer Slow, Eventually Malloc
Malloc
C dynamic memory allocation refers to performing dynamic memory allocation in the C via a group of functions in the C standard library, namely malloc, realloc, calloc and free....

s All Computer Storage
, and Eventually Makes All Computers Sick. However, modern computers are fast enough that Emacs is seldom felt to be slow. In fact, Emacs starts up more quickly than most modern word processors. Handling large files on 32 bit systems is still a weak point for Emacs. Before version 23.2 Emacs could handle files up to around 256 MB; with 23.2 this was raised to around 512 MB. Even on 64 bit systems the limit of 512MB is only lifted in Emacs-24.

Platforms

Emacs has become one of the most ported
Porting
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...

 non-trivial computer programs. It runs on a wide variety of operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s, including most Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 systems (GNU/Linux, the various BSDs
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

, Solaris, AIX
AIX operating system
AIX AIX AIX (Advanced Interactive eXecutive, pronounced "a i ex" is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms...

, HP-UX
HP-UX
HP-UX is Hewlett-Packard's proprietary implementation of the Unix operating system, based on UNIX System V and first released in 1984...

, IRIX
IRIX
IRIX is a computer operating system developed by Silicon Graphics, Inc. to run natively on their 32- and 64-bit MIPS architecture workstations and servers. It was based on UNIX System V with BSD extensions. IRIX was the first operating system to include the XFS file system.The last major version...

, Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, etc.), DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

, Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 and OpenVMS
OpenVMS
OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...

. Unix systems, both free and proprietary, frequently provide Emacs bundled with the operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

.

Emacs runs both on text terminals and in graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 (GUI) environments. On Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 operating systems, Emacs uses the X Window System
X Window System
The X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...

 to produce its GUI, either directly or using a "widget toolkit" such as Motif
Motif (widget toolkit)
In computing, Motif refers to both a graphical user interface specification and the widget toolkit for building applications that follow that specification under the X Window System on Unix and other POSIX-compliant systems. It emerged in the 1980s as Unix workstations were on the rise, as a...

, LessTif
LessTif
LessTif is a free software reimplementation or clone of the Motif computer programming toolkit, developed by the Hungry Programmers.As opposed to Motif, which is distributed under a proprietary license that can require the payment of royalties, LessTif is distributed under the GNU Lesser General...

, or GTK+
GTK+
GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...

. Emacs can also use the native graphical systems of Mac OS X (using the Carbon
Carbon (API)
Carbon is one of Apple Inc.'s procedural application programming interfaces for the Macintosh operating system. It provides C programming language access to Macintosh system services...

 or Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

 interfaces) and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

. The graphical interface provides menubars, toolbar
Toolbar
In a graphical user interface, on a computer monitor, a toolbar is a GUI widget on which on-screen buttons, icons, menus, or other input or output elements are placed. Toolbars are seen in office suites, graphics editors, and web browsers...

s, scrollbar
Scrollbar
A scrollbar is an object in a graphical user interface with which continuous text, pictures or anything else can be scrolled including time in video applications, i.e., viewed even if it does not fit into the space in a computer display, window, or viewport...

s, and context menu
Context menu
A context menu is a menu in a graphical user interface that appears upon user interaction, such as a right mouse click or middle click mouse operation...

s.

Editing modes

Emacs adapts its behavior to the types of text it edits by entering add-on
Add-on
Add-on might mean:* Plug-in , a piece of software which enhances another software application and usually cannot be run independently** Browser extension, which modifies the interface and/or behavior of web browsers...

 modes called "major modes". Defined major modes exist for ordinary text files, for source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 of many programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

s, for HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 documents, for TeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

 and LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

 documents, and for many other types of text. Each major mode involves an Emacs Lisp program that extends the editor to behave more conveniently for the particular type of text it covers. Typical major modes will provide some or all of the following common features:
  • Syntax highlighting
    Syntax highlighting
    Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...

     (called "font lock" in Emacs): using different "faces" (font/color combinations) to display keyword
    Keyword (computer programming)
    In computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. The meaning of keywords — and, indeed, the meaning of the notion of keyword — differs widely from language to language....

    s, comment
    Comment (computer programming)
    In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program. Those annotations are potentially significant to programmers but typically ignorable to compilers and interpreters. Comments are usually...

    s, and so forth.
  • Automatic indentation: maintaining consistent formatting within a file.
  • "Electric" features, i.e. the automatic insertion of elements such as spaces, newlines, and parentheses which the structure of the document requires.
  • Special editing commands: for example, major modes for programming languages usually define commands to jump to the beginning and the end of a function, while major modes for markup languages such as XML
    XML
    Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

     provide commands to validate documents or to insert closing tags.


Programmers can add extra customized features by using "minor modes". While an Emacs editing buffer can use only one major mode at a time, multiple minor modes can operate simultaneously. These may affect documents directly. For example, the major mode for the C programming language defines a different minor mode for each of the popular indent style
Indent style
In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the C programming language and its descendants, but can be applied to most other programming languages...

s. Or minor modes may affect the editing environment instead. For example, "Winner mode" adds the ability to undo changes to the window configuration, while "MMM-mode" adds the ability to use more than one major mode in a single file, as required in common cases such as editing an HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 document with embedded CSS
CSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...

 and JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

.

The SLIME
SLIME
SLIME, the Superior Lisp Interaction Mode for Emacs, is an Emacs mode for developing Common Lisp applications. SLIME originates in an Emacs mode called SLIM written by Eric Marsden and developed as an open-source project by Luke Gorrie and Helmut Eller. Over 100 Lisp developers have contributed...

 major mode extends Emacs into a development environment for Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

. With SLIME the Emacs editor communicates with a (possibly remote) Common Lisp system over a special communication protocol and provides tools like a Read-Eval-Print-Loop, a data inspector and a debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

.

Self-documenting

The first Emacs included an innovative help library that can display the documentation for every single command, variable, and internal function. (It may have originated this technique.) Because of this, Emacs-proponents described the tools as "self-documenting" — in that it presents its own documentation, not only of its normal features but also of its current state, to the user. For example, the user can find out about the command bound to a particular keystroke simply by entering C-h k (which runs the command describe-key), followed by the keystroke. Each function includes a documentation string, specifically to be used for showing to the user on request. The practice of giving functions documentation strings subsequently spread to various programming languages such as Lisp
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

 and Java.

Further, through Emacs's help system, users can be taken to the actual code for each function — whether a built-in library or an installed third-party library.

Emacs also has a built-in tutorial
Tutorial
A tutorial is one method of transferring knowledge and may be used as a part of a learning process. More interactive and specific than a book or a lecture; a tutorial seeks to teach by example and supply the information to complete a certain task....

. When Emacs starts with no file to edit, it displays instructions for performing simple editing commands and invoking the tutorial.

Manuals

Apart from the built-in documentation, Emacs has an unusually long and detailed manual
User guide
A user guide or user's guide, also commonly known as a manual, is a technical communication document intended to give assistance to people using a particular system...

. An electronic copy of the GNU Emacs Manual, written by Richard Stallman, comes bundled with GNU Emacs and can be viewed with the built-in Info
Texinfo
Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form with a single source file...

 browser. Two other manuals, the Emacs Lisp Reference Manual by Bil Lewis, Richard Stallman, and Dan Laliberte, and An Introduction to Programming in Emacs Lisp by Robert Chassell
Robert J. Chassell
Robert Chassell was one of the founding directors of Free Software Foundation in 1985. While on the Board of Directors, Chassell was also the treasurer for FSF. He left the FSF to become a full-time speaker on free software topics....

, are also included. Apart from the electronic versions, all three manuals are also available in book form, published by the Free Software Foundation
Free Software Foundation
The Free Software Foundation is a non-profit corporation founded by Richard Stallman on 4 October 1985 to support the free software movement, a copyleft-based movement which aims to promote the universal freedom to create, distribute and modify computer software...

. XEmacs has a similar manual to the GNU Emacs Manual, which forked from the GNU Emacs Manual at the same time as the XEmacs software.

Internationalization

Emacs supports the editing of text written in many human languages
Language
Language may refer either to the specifically human capacity for acquiring and using complex systems of communication, or to a specific instance of such a system of complex communication...

. It has support for many alphabets, scripts, writing systems, and cultural conventions. Emacs provides spell-checking for many languages by calling external programs such as ispell
Ispell
Ispell is a spelling checker for Unix that supports most Western languages. It offers several interfaces, including a programmatic interface for use by editors such as emacs...

. Many encoding systems
Character encoding
A character encoding system consists of a code that pairs each character from a given repertoire with something else, such as a sequence of natural numbers, octets or electrical pulses, in order to facilitate the transmission of data through telecommunication networks or storage of text in...

, including UTF-8
UTF-8
UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

, are supported. In Emacs 22 Unicode support is fairly advanced; however, it uses Emacs-specific encoding internally, necessitating conversion upon load and save.

In Emacs 23, UTF-8
UTF-8
UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

 has become the Emacs-internal encoding. As for writing direction however, only left-to-right writing is supported. In the forthcoming version, Emacs 24, right-to-left writing will be supported.

The Emacs user interface originated in English, and has not been translated into any other language, with the exception of the beginners' tutorial.

Visually impaired and blind users can use a subsystem called Emacspeak
Emacspeak
Emacspeak is a free computer application, a speech interface and an audio desktop employing Emacs, which is written in C, Emacs Lisp and Tcl and developed principally by T. V. Raman and first released May 1995; it is portable to all POSIX-compatible OSs...

which allows the editor to be used through audio feedback only.

Commands

In the normal editing mode, Emacs behaves like other text editors: the character keys (a, b, c, 1, 2, 3, etc.) insert the corresponding characters, the arrow keys move the editing point, backspace
Backspace
Backspace is the keyboard key that originally pushed the typewriter carriage one position backwards, and in modern computer displays moves the cursor one position backwards, deletes the preceding character, and shifts back the text after it by one position....

 deletes text, and so forth. Users invoke other commands with modified keystrokes
Modifier key
In computing, a modifier key is a special key on a computer keyboard that modifies the normal action of another key when the two are pressed in combination....

: pressing the control key
Control key
In computing, a Control key is a modifier key which, when pressed in conjunction with another key, will perform a special operation ; similar to the Shift key, the Control key rarely performs any function when pressed by itself...

 and/or the meta key
Meta key
The meta key is a special key on MIT keyboards, such as the space-cadet keyboard, and on Sun Microsystems keyboards, marked as a solid diamond.The key is similar in function to the Macintosh's command key, which has the same location...

/alt key
Alt key
The Alt key on a computer keyboard is used to change the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing "A" will type the letter a, but if you hold down either Alt key while pressing A, the computer...

/Escape key in conjunction with a regular key. Every editing command is actually an invocation of a function in the Emacs Lisp environment. Even a command as simple as typing a to insert the character a involves calling a function — in this case, self-insert-command.

Alternatively, users preferring IBM Common User Access style keys can use "cua-mode". This has been a third-party package up to, and including, GNU Emacs 21, but is included in GNU Emacs from version 22 onward.

Note that the commands save-buffer and save-buffers-kill-emacs use multiple modified keystrokes. For example, C-x C-c means: while holding down the control key, press x; then, while holding down the control key, press c.

Some Emacs commands work by invoking an external program (such as ispell
Ispell
Ispell is a spelling checker for Unix that supports most Western languages. It offers several interfaces, including a programmatic interface for use by editors such as emacs...

 for spell-checking or gcc
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...

 for program compilation), parsing the program's output, and displaying the result in Emacs.

Minibuffer

Emacs uses the minibuffer (normally the bottommost line) to request information. Text to target in a search, the name of a file to read or save and similar information is entered in the minibuffer. When applicable, command line completion
Command line completion
Command line completion is a common feature of command line interpreters, in which the program automatically fills in partially typed commands....

 is usually available using the tab and space keys.

File management and display

Emacs keeps text in objects called buffers. The user can create new buffers and dismiss unwanted ones, and several buffers can exist at the same time. Most buffers contain text loaded from text file
Text file
A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists within a computer file system...

s, which the user can edit and save back to disk. Buffers also serve to store temporary text, such as the documentation strings displayed by the help library.

In both text-terminal and graphical modes, Emacs can split the editing area into separate sections (referred to since 1975 as "windows", which can be confusing on systems that have another concept of "windows" as well), so that more than one buffer, or several parts of a buffer, can be displayed at a time. This has many uses. For example, one section can be used to display the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 of a program, while another displays the results from compiling the program. In graphical environments, Emacs can also launch multiple graphical-environment windows
Window (computing)
In computing, a window is a visual area containing some kind of user interface. It usually has a rectangular shape that can overlap with the area of other windows...

, known as "frames" in the context of Emacs.

Emacs pinky

The original Space-cadet keyboard
Space-cadet keyboard
The space-cadet keyboard is a keyboard used on MIT Lisp machines and designed by Tom Knight, which inspired several still-current jargon terms in the field of computer science and influenced the design of Emacs...

 on which Emacs was developed had the Control keys adjacent to the space bar, making them easy to hit with the thumb, and both it and the dedicated Meta key were larger than the regular keys. These keys are more difficult to press on today's common IBM PC keyboard
IBM PC keyboard
The keyboards for IBM PC compatible computers are standardized. However, during the 3-plus decades of PC architecture being constantly updated, multiple types of keyboard layout variations have been developed....

 layout which exchanges the Control and Meta keys from the Space-cadet's layout. Because of Emacs' dependence on these modifier keys, and in particular because of how many keyboard-users press control keys with the little finger
Little finger
The little finger, often called the pinky in American English, pinkie in Scottish English , or small finger in medicine, is the most ulnar and usually smallest finger of the human hand, opposite the thumb, next to the ring finger.-Muscles:There are four muscles that...

 ("pinky"), heavy Emacs users have experienced repetitive strain injury
Repetitive strain injury
Repetitive strain injury is an injury of the musculoskeletal and nervous systems that may be caused by...

 pain in their pinky fingers. This has been dubbed the "Emacs Pinky", and vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

 advocates often cite it as a reason to switch to vi—even though vi users often transpose Caps Lock with their mode change key for similar reasons.

To reduce strain stretching for the Control key, many Emacs users transpose the left Control key and the left Caps-lock key, define both as Control keys, or transpose the Control and Meta keys. Some use viper-mode, a feature built into Emacs that allows the use of the vi keys for basic text editing and the Emacs keys for more advanced features. Some use StickyKeys as a means to turn key combinations into key sequences. Others use special keyboards such as Kinesis's Contoured Keyboard
Kinesis (keyboard)
The Kinesis line of ergonomic computer keyboards is an alternative to the traditional keyboard design. Most widely known among these are the contoured Advantage line, which feature recessed keys in two bucket-like hollows which allow the fingers to reach keys with less effort as well as a central...

, which reduces the strain by moving the modifier keys so that they are in a position to be easily pushed by the thumb
Thumb
The thumb is the first digit of the hand. When a person is standing in the medical anatomical position , the thumb is the lateral-most digit...

, or the Microsoft Natural keyboard
Microsoft Natural keyboard
The Microsoft Natural Keyboard is a computer keyboard that was introduced by Microsoft in 1994. The keyboard was a split keyboard with each half of the keyboard separated and tilted upwards and down from the center of the keyboard...

, which has large modifier keys placed symmetrically on both sides of the keyboard so that they can be pressed with the palm.

See also

  • Comparison of text editors
    Comparison of text editors
    This article provides basic comparisons for common text editors. More feature details for text editors are available from the Category of text editor features and from the individual products' articles...

  • Comparison of HTML editors
    Comparison of HTML editors
    The following tables compare general and technical information for a number of HTML editors.This article is not all-inclusive or necessarily up to date...

  • Conkeror
    Conkeror
    Conkeror is a Mozilla-based web browser designed to be navigated primarily by a computer keyboard. Its design is mainly patterned after the text editor GNU Emacs, with some influence from other programs, including vi....

    , a Mozilla
    Mozilla
    Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

    -based web browser inspired by Emacs
  • GNU TeXmacs
    GNU TeXmacs
    GNU TeXmacs is a free scientific word processor and typesetting component of the GNU Project. It was inspired by TeX and GNU Emacs, though it shares no code with those programs. TeXmacs does use TeX fonts. It is written and maintained by Joris van der Hoeven. The program produces structured...

  • Space-cadet keyboard
    Space-cadet keyboard
    The space-cadet keyboard is a keyboard used on MIT Lisp machines and designed by Tom Knight, which inspired several still-current jargon terms in the field of computer science and influenced the design of Emacs...

  • List of text editors
  • List of Unix programs

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK