GNU Emacs
   HOME

TheInfoList



OR:

GNU Emacs is a
text editor A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
and suite of
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
tools. Its development began in 1984 by
GNU Project The GNU Project ( ) is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and Computer hardware, computing dev ...
founder
Richard Stallman Richard Matthew Stallman ( ; born March 16, 1953), also known by his initials, rms, is an American free software movement activist and programmer. He campaigns for software to be distributed in such a manner that its users have the freedom to ...
, based on the
Emacs Emacs (), originally named EMACS (an acronym for "Editor Macros"), 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, s ...
editor developed for
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating systems. GNU Emacs has been a central component of the GNU project and a flagship project of the
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
movement. The program's tagline is "the extensible self-documenting text editor." Most functionality in GNU Emacs is implemented in user-accessible
Emacs Lisp Emacs Lisp is a Lisp dialect made for Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter. Emacs Lisp code is used to modify, extend and customi ...
, allowing deep extensibility directly by users and through community-contributed packages. Its built-in features include a file browser and editor (
Dired Dired (for Directory Editor) is a computer program for editing file system directories. It typically runs inside the Emacs text editor as a specialized mode, though standalone versions have been written. Dired was the file manager, or visual ...
), an advanced calculator (Calc), an email client and news reader (
Gnus Gnus (), or Gnus Network User Services, is a message reader which is part of GNU Emacs. It supports reading and composing both e-mail and news and can also act as an RSS reader, web processor, and directory browser for both local and remote file ...
), a
Language Server Protocol The Language Server Protocol (LSP) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide "language intelligence tools": programming language-specific feature ...
integration, and the productivity system
Org-mode Mode (also: ''org-mode''; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text fi ...
. A large community of users have contributed extensions such as the
Git Git () is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Design goals of Git include speed, data integrity, and suppor ...
interface
Magit Magit ( or ) is an interface to the Git version control system, available as a GNU Emacs package written in Emacs Lisp. It is available through the MELPA package repository, on which it is the most-downloaded non-library package, with over 4.3 ...
, the Vim emulation layer Evil, several search frameworks, the window manager
EXWM In computing, a tiling window manager is a window manager with the organization of the screen often dependant on mathematical formulas to organise the windows into a non-overlapping frame. This is opposed to the more common approach used by sta ...
, and tools for working with a wide range of programming languages.


History

The original
EMACS Emacs (), originally named EMACS (an acronym for "Editor Macros"), 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, s ...
was written in 1976 by David A. Moon and Guy L. Steele Jr. as a set of macros for the TECO editor, and in 1984, Richard Stallman began work on GNU Emacs, to produce a
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
replacement to the proprietary Gosling Emacs. GNU Emacs was initially based on Gosling Emacs, but Stallman's replacement of its Mocklisp
interpreter Interpreting is translation from a spoken or signed language into another language, usually in real time to facilitate live communication. It is distinguished from the translation of a written text, which can be more deliberative and make use o ...
with a true Lisp interpreter required that nearly all of its code be rewritten. This became the first program released by the then-nascent GNU Project. GNU Emacs is written in C and provides
Emacs Lisp Emacs Lisp is a Lisp dialect made for Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter. Emacs Lisp code is used to modify, extend and customi ...
, 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 major version skipped from "1" to "13". A new third version number was added to represent changes made by user sites. In the current numbering scheme, a number with two components signifies a release version, with development versions having three components. GNU Emacs was later ported to the
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
. It 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's email subsystem in his 1986 cracking spree, in which he gained
superuser In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of the ...
access to Unix computers. Although users commonly submitted patches and Elisp code to the net.emacs
newsgroup A Usenet newsgroup is a repository usually within the Usenet system for messages posted from users in different locations using the Internet. They are not only discussion groups or conversations, but also a repository to publish articles, start ...
, participation in GNU Emacs development was relatively restricted until 1999, and was used as an example of the "Cathedral" development style in ''
The Cathedral and the Bazaar ''The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary'' (abbreviated ''CatB'') is an essay, and later a book, by Eric S. Raymond on software engineering methods, based on his observations of the Linux ...
''. 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 today uses the
Git Git () is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Design goals of Git include speed, data integrity, and suppor ...
DVCS. 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 have overseen maintenance since 2008. On September 21, 2015 Monnier announced that he would be stepping down as maintainer effective with the feature freeze of Emacs 25. Longtime contributor John Wiegley was announced as the new maintainer on November 5, 2015. Wiegley was joined by Eli Zaretskii in July, 2016, and Lars Ingebrigtsen in September, 2020.


Licensing

The terms of the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
(GPL) state that the Emacs source code, including both the C and Emacs Lisp components, are freely available for examination, modification, and redistribution. Older versions of the GNU Emacs documentation appeared under an ad-hoc license that required the inclusion of certain text in any modified copy. In the GNU Emacs user's manual, for example, this included instructions for obtaining GNU Emacs and Richard Stallman's essay '' The GNU Manifesto''. 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 The GNU Free Documentation License (GNU FDL or GFDL) is a copyleft license for free documentation, designed by the Free Software Foundation (FSF) for the GNU Project. It is similar to the GNU General Public License, giving readers the rights ...
with "invariant sections" that require the inclusion of the same documents and that the manuals proclaim themselves as ''GNU Manuals''. For GNU Emacs, like many other GNU packages, it remains policy to accept significant code contributions only if the
copyright A copyright is a type of intellectual property that gives its owner the exclusive legal right to copy, distribute, adapt, display, and perform a creative work, usually for a limited time. The creative work may be in a literary, artistic, ...
holder executes a suitable disclaimer or assignment of their copyright interest to the
Free Software Foundation The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by Richard Stallman on October 4, 1985. The organisation supports the free software movement, with the organization's preference for software being distributed ...
(FSF.) Small contributions of fewer than 10 lines of code are exempt. This policy is in place so that the FSF can defend the software in court if its
copyleft Copyleft is the legal technique of granting certain freedoms over copies of copyrighted works with the requirement that the same rights be preserved in derivative works. In this sense, ''freedoms'' refers to the use of the work for any purpose, ...
license is violated. In 2011, it was noticed that GNU Emacs had been accidentally releasing some binaries without corresponding source code for two years, in opposition to the intended spirit of the GPL. Richard Stallman described this incident as "a very bad mistake," which was promptly fixed. The FSF did not sue any downstream redistributors who unknowingly violated the GPL by distributing these binaries.


Using GNU Emacs


Commands

In its normal editing mode, GNU Emacs behaves like common text editors by allowing the user to
type Type may refer to: Science and technology Computing * Typing, producing text via a keyboard, typewriter, etc. * Data type, collection of values used for computations. * File type * TYPE (DOS command), a command to display contents of a file. * ...
text with the keyboard and move the editing point with
arrow keys Arrow keys or cursor movement keys are keys on a computer keyboard that are either programmed or designated to move the cursor (computers), cursor in a specified direction. The term "cursor movement key" is distinct from "arrow key" in that th ...
.
Escape key On computer keyboards, the Esc key (named ''Escape key'' in the international standard series ISO/IEC 9995) is a key used to generate the escape character (which can be represented as ASCII code 27 in decimal, Unicode U+001B, or ). The escap ...
sequences or pressing the
control key In computing, a Control key is a modifier key which, when pressed in conjunction with another key, performs a special operation (for example, ). Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. ...
and/or the
meta key The Meta key is a modifier key on certain Computer keyboard, keyboards. It first appeared on the Stanford Artificial Intelligence Lab (SAIL) keyboard in 1970. History The Meta key first appeared on the Stanford Artificial Intelligence Lab (SA ...
,
alt key The Alt key (pronounced or ) on a computer keyboard is used to change (alternate) 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 ty ...
or super keys in conjunction with a regular key produces modified keystrokes that invoke functions from the Emacs Lisp environment. Commands such as save-buffer and save-buffers-kill-emacs combine multiple modified keystrokes. Some GNU Emacs commands work by invoking external programs, such as ispell for spell-checking and the
GNU Compiler Collection The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, Computer architecture, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes ...
(GCC) for program compilation. Emacs also supports "inferior processes," long-lived
child process A child process (CP) in computing is a process created by another process (the parent process). This technique pertains to multitasking operating systems, and is sometimes called a subprocess or traditionally a subtask. There are two major proce ...
es that interact with the editor. This is used to implement , running a
Unix shell A Unix shell is a Command-line_interface#Command-line_interpreter, command-line interpreter or shell (computing), shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command languag ...
as inferior process, as well as
read–eval–print loop A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written ...
(REPL) modes for various programming languages. Emacs' support for external processes makes it suitable for interactive programming along the lines of
Interlisp Interlisp (also seen with a variety of capitalizations) is a programming environment built around a version of the programming language Lisp. Interlisp development began in 1966 at Bolt, Beranek and Newman (renamed BBN Technologies) in Cambridge, ...
or
Smalltalk Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
. Users who prefer the widely used IBM Common User Access keyboard shortcut layout can use , a package that originally was a third-party add-on but has been included in GNU Emacs since version 22.


Minibuffer

Emacs uses the "minibuffer," normally the bottommost line, to display messages and request information, functions that are often performed by
dialog box In computing, a dialog box (also simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response. Dialog boxes are classified as " modal" or "modeless", dep ...
es in GUI editors. The minibuffer holds information such as text to target in a search or the name of a file to read or save. When applicable,
command-line completion Command-line completion (also tab completion) is a common feature of command-line interpreters, in which the program automatically fills in partially typed commands. Command line interpreters are programs that allow a user to interact with the ...
is available using the tab and space keys.


File management and display

Emacs keeps text in
data structure In computer science, a data structure is a data organization and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the relationships amo ...
s known as buffers. Buffers may or may not be displayed onscreen, and all buffer features are accessible by both
Emacs Lisp Emacs Lisp is a Lisp dialect made for Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter. Emacs Lisp code is used to modify, extend and customi ...
programs and the user interface. The user can create new buffers and dismiss unwanted ones, and many buffers can exist at the same time, limited only by available memory. Emacs can be configured to save the list of open buffers on exit, and reopen this list when it is restarted. Some buffers contain text loaded from
text file A text file (sometimes spelled textfile; an old alternative name is flat file) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In ope ...
s, which the user can edit and save back to permanent storage. These buffers are said to be "visiting" files. Buffers also serve to display other data, such as the output of Emacs commands,
dired Dired (for Directory Editor) is a computer program for editing file system directories. It typically runs inside the Emacs text editor as a specialized mode, though standalone versions have been written. Dired was the file manager, or visual ...
directory listings, documentation strings displayed by the "help" library and notification messages that in other editors would be displayed in a
dialog box In computing, a dialog box (also simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response. Dialog boxes are classified as " modal" or "modeless", dep ...
. Some of these notifications are displayed briefly in the minibuffer, and GNU Emacs provides a buffer that keeps a history of the most recent notifications of this type. When the minibuffer is used for output from Emacs, it is called the "echo area". Longer notifications are displayed in buffers of their own. The maximum length of messages that will be displayed in the minibuffer is, of course, configurable. Buffers can also serve as input and output areas for an external process such as a
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
or REPL. Buffers which Emacs creates on its own are typically named with
asterisk The asterisk ( ), from Late Latin , from Ancient Greek , , "little star", is a Typography, typographical symbol. It is so called because it resembles a conventional image of a star (heraldry), heraldic star. Computer scientists and Mathematici ...
s on each end, to distinguish from user buffers. The list of open buffers is itself displayed in this type of buffer. Most Emacs key sequences remain functional in any buffer. For example, the standard Ctrl-s isearch function can be used to search filenames in dired buffers, and the file list can be saved to a text file just as any other buffer. Dired buffers can be switched to a writable mode, in which filenames and attributes can be edited textually; when the buffer is saved, the changes are written to the filesystem. This allows multiple files to be renamed using the search and replace features of Emacs. When so equipped, Emacs displays image files in buffers. Emacs is binary safe and 8-bit clean. Emacs can split the editing area into separate non-overlapping sections called "windows," a feature that has been available since 1975, predating the graphical user interface in common use. In Emacs terminology, "windows" are similar to what other systems call " frames" or " panes" a rectangular portion of the program's display that can be updated and interacted with independently. Each Emacs window has a
status bar A status bar is a graphical control element which poses an information area typically found at the Window (computing), window's bottom. It can be divided into sections to group information. Its job is primarily to display information about the c ...
called the "mode line" displayed by default at the bottom edge of the window. Emacs windows are available both in text-terminal and graphical modes and allow more than one buffer, or several parts of a buffer, to be displayed at once. Common applications are to display a
dired Dired (for Directory Editor) is a computer program for editing file system directories. It typically runs inside the Emacs text editor as a specialized mode, though standalone versions have been written. Dired was the file manager, or visual ...
buffer along with the contents of files in the current directory (there are special modes to make the file buffer follow the file highlighted in dired), to display the
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
of a program in one window while another displays a
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
buffer with the results of compiling the program, to run a debugger along with a shell buffer running the program, to work on code while displaying a
man page A man page (short for manual page) is a form of software documentation found on Unix and Unix-like operating systems. Topics covered include programs, system libraries, system calls, and sometimes local system details. The local host administr ...
or other documentation (possibly loaded over the
World Wide Web The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
using one of Emacs' built-in web browsers) or simply to display multiple files for editing at once such as a header along with its implementation file for C-based languages. In addition, there is , a minor mode that chains windows to display non-overlapping portions of a buffer. Using , a single file can be displayed in multiple side-by-side windows that update appropriately when scrolled. In addition, Emacs supports "narrowing" a buffer to display only a portion of a file, with top/bottom of buffer navigation functionality and buffer size calculations reflecting only the selected range. Emacs windows are tiled and cannot appear "above" or "below" their companions. Emacs can launch multiple "frames", which are displayed as individual
windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
in a graphical environment. On a text terminal, multiple frames are displayed stacked filling the entire terminal, and can be switched using the standard Emacs commands.


Major modes

GNU Emacs can display or edit a variety of different types of text and adapts its behavior by entering add-on modes called "major modes". There are major modes for many different purposes including editing ordinary text files, the
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
of many markup and
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s, as well as displaying
web page A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
s, directory listings and other system info. Each major mode involves an Emacs Lisp program that extends the editor to behave more conveniently for the specified type of text. Major modes typically provide some or all of the following common features: * Syntax highlighting ("font lock"): combinations of fonts and colors, termed "faces," that differentiate between document elements such as keywords and comments. * Automatic indentation to maintain consistent formatting within a file. * The automatic insertion of elements required by the structure of the document, such as spaces, newlines, and parentheses. * Special editing commands, such as commands to jump to the beginning or the end of a function while editing a programming file or commands to validate documents or insert closing tags while working with markup languages such as
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
.


Minor modes

The use of "minor modes" enables further customization. A GNU Emacs editing buffer can use only one major mode at a time, but multiple minor modes can operate simultaneously. These may operate directly on documents, as in the way the major mode for the C programming language defines a separate minor mode for each of its popular
indent style In computer programming, indentation style is a convention or style, governing the indentation of lines of source code. An indentation style generally specifies a consistent number of whitespace characters before each line of a block, so that ...
s, or they may alter the editing environment. Examples of the latter include a mode that adds the ability to undo changes to the window configuration and one that performs on-the-fly syntax checking. There is also a minor mode that allows multiple major modes to be used in a single file, for convenience when editing a document in which multiple programming languages are embedded.


"Batch mode"

GNU Emacs supports the capability to use it as an interpreter for the
Emacs Lisp Emacs Lisp is a Lisp dialect made for Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter. Emacs Lisp code is used to modify, extend and customi ...
language without displaying the text editor user interface. In batch mode, user configuration is not loaded and the terminal
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
characters C-c and C-z will have their usual effect of exiting the program or suspending execution instead of invoking Emacs keybindings. GNU Emacs has command line options to specify either a file to load and execute, or an Emacs Lisp function may be passed in from the command line. Emacs will start up, execute the passed-in file or function, print the results, then exit. The shebang line #!/usr/bin/emacs --script allows the creation of standalone scripts in Emacs Lisp.


Manuals

The ''GNU Emacs Manual'', written by Richard Stallman, is bundled with GNU Emacs and can be viewed with the built-in info browser. Two additional 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, are included. All three manuals are also published in book form by the
Free Software Foundation The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by Richard Stallman on October 4, 1985. The organisation supports the free software movement, with the organization's preference for software being distributed ...
.


Internationalization

GNU Emacs has support for many alphabets, scripts, writing systems, and cultural conventions and provides spell-checking for many languages by calling external programs such as ispell. Version 24 added support for bidirectional text and left-to-right and right-to-left
writing direction A writing system comprises a set of symbols, called a ''script'', as well as the rules by which the script represents a particular language. The earliest writing appeared during the late 4th millennium BC. Throughout history, each independen ...
for languages such as Arabic, Persian and Hebrew. Many
character encoding Character encoding is the process of assigning numbers to graphical character (computing), characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using computers. The numerical v ...
systems, including
UTF-8 UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8. UTF-8 supports all 1,112,0 ...
, are supported. GNU Emacs uses UTF-8 for its encoding as of version 23, while prior versions used their own encoding internally and performed conversion upon load and save. The internal encoding used by XEmacs is similar to that of GNU Emacs but differs in details. The GNU Emacs user interface originated in English and, with the exception of the beginners' tutorial, has not been translated into any other language. A subsystem called '' Emacspeak'' enables visually impaired and blind users to control the editor through audio feedback.


Extensibility

The behavior of GNU Emacs can be modified and extended almost without limit by incorporating Emacs Lisp programs that define new commands, new buffer modes, new keymaps, add command-line options, and so on. Many extensions providing user-facing functionality define a major mode (either for a new file type or to build a non-text-editing user interface); others define only commands or minor modes, or provide functions that enhance another extension. Since version 24 GNU Emacs includes a built-in package manager accessible with the list-packages command that allows users to search for and install packages. Historically, packages were downloaded manually, often distributed through the
Usenet Usenet (), a portmanteau of User's Network, is a worldwide distributed discussion system available on computers. It was developed from the general-purpose UUCP, Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Elli ...
newsgroup A Usenet newsgroup is a repository usually within the Usenet system for messages posted from users in different locations using the Internet. They are not only discussion groups or conversations, but also a repository to publish articles, start ...
gnu.emacs.sources. Now, packages can be retrieved from various ELPA (Emacs Lisp Package Archive) repositories, including one run by the GNU Project. Over time many popular packages have been included in Emacs by default; for example version 21 began bundling
Org-mode Mode (also: ''org-mode''; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text fi ...
, Calc, TRAMP, and many others. Notable packages include: *
AUCTeX AUCTeX is an extensible package for writing and formatting TeX files in Emacs and XEmacs. Package AUCTeX provides syntax highlighting, smart indentation and formatting, previews of mathematics and other elements directly in the editing buffer, s ...
, tools to edit and process
TeX Tex, TeX, TEX, may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Tex Earnhardt (1930–2020), U.S. businessman * Joe Tex (1933–1982), stage name of American soul singer ...
and
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well. In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
documents *
Dired Dired (for Directory Editor) is a computer program for editing file system directories. It typically runs inside the Emacs text editor as a specialized mode, though standalone versions have been written. Dired was the file manager, or visual ...
, a file manager * Dissociated press, a Racter-like text generator * Dunnet, a
text adventure Interactive fiction (IF) is software simulating environments in which players use text Command (computing), commands to control Player character, characters and influence the environment. Works in this form can be understood as literary narrati ...
* Emacs Web Wowser (eww), a
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
. *
Emacs Speaks Statistics Emacs Speaks Statistics (ESS) is an Emacs package for programming in statistical languages. It adds two types of modes to emacs: # ESS modes for editing statistical languages like R, SAS and Julia; and # inferior ESS (iESS) modes for intera ...
(ESS) modes for editing statistical languages like R and SAS * ERC, an
IRC IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for group communication in discussion forums, called '' channels'', but also allows one-on-one communication via private messages as well as chat ...
client * Eshell, a command line
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
written in Emacs Lisp. This allows closer integration with the Emacs environment than standard shells such as bash or
PowerShell PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
, which are also available from within Emacs. For example, in Eshell, Elisp functions are available as shell commands and output from Unix commands can be redirected to an Emacs buffer. *
Exwm In computing, a tiling window manager is a window manager with the organization of the screen often dependant on mathematical formulas to organise the windows into a non-overlapping frame. This is opposed to the more common approach used by sta ...
, an
X window manager An X window manager is a window manager that runs on top of the X Window System, a windowing system mainly used on Unix-like systems. Unlike MacOS Classic, macOS, and Microsoft Windows platforms (excepting Microsoft Windows explorer.exe shel ...
allowing X11 apps to be run in an Emacs window. *
Gnus Gnus (), or Gnus Network User Services, is a message reader which is part of GNU Emacs. It supports reading and composing both e-mail and news and can also act as an RSS reader, web processor, and directory browser for both local and remote file ...
, a full-featured
news client A newsreader is a software application that reads articles on Usenet distributed throughout newsgroups. Newsreaders act as clients which connect to a news server, via the Network News Transfer Protocol (NNTP), to download articles and post new ...
(newsreader) and
email client An email client, email reader or, more formally, message user agent (MUA) or mail user agent is a computer program used to access and manage a user's email. A web application which provides message management, composition, and reception functio ...
and early evidence for Zawinski's Law *
Magit Magit ( or ) is an interface to the Git version control system, available as a GNU Emacs package written in Emacs Lisp. It is available through the MELPA package repository, on which it is the most-downloaded non-library package, with over 4.3 ...
, for working with the version control system
Git Git () is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Design goals of Git include speed, data integrity, and suppor ...
* MULtilingual Enhancement to Emacs (
MULE The mule is a domestic equine hybrid between a donkey, and a horse. It is the offspring of a male donkey (a jack) and a female horse (a mare). The horse and the donkey are different species, with different numbers of chromosomes; of the two ...
) allows editing of text in multiple languages in a manner somewhat analogous to Unicode *
Org-mode Mode (also: ''org-mode''; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text fi ...
for keeping notes, maintaining various types of lists, planning and measuring projects, and composing documents in many formats (such as
PDF Portable document format (PDF), standardized as ISO 32000, is a file format developed by Adobe Inc., Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, computer hardware, ...
,
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
, or
OpenDocument The Open Document Format for Office Applications (ODF), also known as OpenDocument, standardized as ISO 26300, is an open file format for word processor, word processing documents, spreadsheets, Presentation program, presentations and ...
formats). There are
static site generator Static site generators (SSGs) are Software engine, software engines that use text input files (such as Markdown, reStructuredText, AsciiDoc and JSON) to generate static web pages. Unlike dynamic websites, these static pages do not change based on t ...
s using org mode, as well as an extension, Babel, allowing it to be used for
literate programming Literate programming (LP) is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macr ...
. * Rcirc, an
IRC IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for group communication in discussion forums, called '' channels'', but also allows one-on-one communication via private messages as well as chat ...
client * Superior Lisp Interaction Mode for Emacs (
SLIME Slime or slimy may refer to: Science and technology Biology * Slime coat, the coating of mucus covering the body of all fish * Slime mold, an informal name for several eukaryotic organisms * Biofilm, or slime, a syntrophic community of micr ...
) extends GNU Emacs into a development environment for
Common Lisp Common Lisp (CL) is a dialect of the Lisp programming language, published in American National Standards Institute (ANSI) standard document ''ANSI INCITS 226-1994 (S2018)'' (formerly ''X3.226-1994 (R1999)''). The Common Lisp HyperSpec, a hyperli ...
. With SLIME (written in Emacs Lisp) the GNU Emacs editor communicates with a Common Lisp system (using the SWANK backend) over a special communication protocol and provides such tools as a
read–eval–print loop A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written ...
, a data inspector and a
debugger A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
. *
Texinfo Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form (creating filetypes as , , , etc., and a specific hypertext format, ) with a single source file. It is implemented by a computer program released as ...
(Info), an online help-browser


Performance

In its early history, GNU Emacs often ran noticeably slower than rival text editors because the loading and
interpreting Interpreting is translation from a spoken or signed language into another language, usually in real time to facilitate live communication. It is distinguished from the translation of a written text, which can be more deliberative and make use o ...
of its
Lisp Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation. Originally specified in the late 1950s, ...
-based code incurs a performance overhead. Modern computers are powerful enough to run GNU Emacs with ease, but versions prior to 19.29 (released in 1995) couldn't edit files larger than 8 MB. The file size limit was raised in successive versions, and
32 bit 3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious and cultural significance in many societies ...
versions after GNU Emacs 23.2 can edit files up to 512 MB in size. Emacs compiled on a 64-bit machine can handle much larger buffers. While GNU Emacs is largely written in Emacs Lisp, it makes extensive use of natively compiled C code to improve performance. In addition to its own C code, it uses external libraries such as libxml2 for parsing
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
. Packages installed by the user can load dynamic modules. Since version 28.1, Emacs can natively compile Emacs Lisp files via libgccjit, as opposed to just byte compiling them, resulting in a significant boost in performance.


Platforms

GNU Emacs runs on a wide variety of
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, including DOS,
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and most
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating systems, such as
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, the various BSDs, Solaris, AIX,
HP-UX HP-UX (from "Hewlett Packard Unix") is a proprietary software, proprietary implementation of the Unix operating system developed by Hewlett Packard Enterprise; current versions support HPE Integrity Servers, based on Intel's Itanium architect ...
and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
. Many Unix-like systems include Emacs by default. In 2023 an official port for Android was released. Version 23.1 removed support for some platforms deemed obsolete. GNU Emacs runs both on
text terminal A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. Most early computers only had a front panel to input or display ...
s and in
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI) environments. On Unix-like operating systems, GNU Emacs can use the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
to produce its GUI either directly using Athena widgets or by using a "widget toolkit" such as Motif, LessTif, or
GTK+ GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary s ...
. GNU Emacs can also use the graphics systems native to macOS and Windows to provide menubars,
toolbar The toolbar, also called a bar or standard toolbar (originally known as ribbon), is a graphical control element on which on-screen icons can be used. A toolbar often allows for quick access to functions that are commonly used in the program. Some ...
s,
scrollbar A scrollbar is an interaction technique or widget (GUI), widget in which continuous text, pictures, or any other content can be Scrolling, scrolled in a predetermined direction (up, down, left, or right) on a computer display, window (computing) ...
s and
context menu A context menu (also called contextual, shortcut, and pop up or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choic ...
s conforming more closely to each platform's
look and feel In software design, the look and feel of a graphical user interface comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces (the "look"), as well as the behavior of dynamic elements such as buttons, boxes ...
.


Forks


XEmacs

Lucid Emacs, based on an early version of GNU Emacs 19, was developed beginning in 1991 by
Jamie Zawinski Jamie Werner Zawinski (born November 3, 1968), commonly known as jwz, is an American computer programmer, blogger, and impresario. He is best known for his role in the creation of Netscape Navigator, Netscape Mail, Lucid Emacs, Mozilla.org, an ...
and others at Lucid Inc. One of the best-known forks in
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
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. After Lucid filed for bankruptcy, Lucid Emacs was renamed
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. Any user can download, use, and modify ...
. XEmacs development has slowed, with the most recent stable version 21.4.22 released in January 2009, while GNU Emacs has implemented many formerly XEmacs-only features. This has led some users to proclaim XEmacs' death.


Other forks of GNU Emacs

Other forks, less known than XEmacs, include: *
Meadow A meadow ( ) is an open habitat or field, vegetated by grasses, herbs, and other non- woody plants. Trees or shrubs may sparsely populate meadows, as long as they maintain an open character. Meadows can occur naturally under favourable con ...
a Japanese version for Microsoft Windows * SXEmacs Steve Youngs' fork of XEmacs * Aquamacs a version which focuses on integrating with the Apple Macintosh user interface * Remacs an incremental port of GNU Emacs to the
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
programming language, incomplete and no longer maintained as of 2023.


Release history

Changes in each Emacs release are listed in a NEWS file distributed with Emacs. Changes brought about by ''downgrading'' to the previous release are listed in an "Antinews" file, often with some snarky commentary on why this might be desirable.


References


Further reading

* * * * *


External links

*
Unofficial Emacs wiki

Emacs - Free Software Directory
{{Authority control Emacs Free and open-source Android software Free file comparison tools Free integrated development environments Free software programmed in C Free software programmed in Lisp Free text editors
Emacs Emacs (), originally named EMACS (an acronym for "Editor Macros"), 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, s ...
Hex editors Linux integrated development environments Linux text editors MacOS text editors OpenVMS text editors Software using the GNU General Public License Unix text editors Windows text editors 1985 software