GNU Emacs
| Company type | Free software |
|---|---|
| Industry | Software |
| Founded | 1984 |
| Founder | Richard Stallman |
| Products | Text editor, software utilities |
| Owner | GNU Project |
| Website | www |
GNU Emacs is a text editor and a collection of free software utilities initiated in 1984 by GNU Project founder Richard Stallman. It draws inspiration from the original Emacs editor designed for Unix platforms. Serving as a fundamental element of the GNU project, it also stands as a prominent symbol within the free software community.
The software is often described by its slogan: "the extensible self-documenting text editor." Most of its capabilities are crafted in user-accessible Emacs Lisp, allowing users and developers to extensively tailor its behavior. Among its integrated tools are a file manager (Dired), an advanced calculator (Calc), an email and news client (Gnus), support for the Language Server Protocol, and the productivity framework Org-mode. A vibrant ecosystem has produced numerous add-ons, including the Git interface Magit, the Vim emulation layer Evil, various search utilities, the window manager EXWM, and numerous language-specific programming aids.
History
The original iteration, known as EMACS, was developed in 1976 by David A. Moon and Guy L. Steele Jr. as macro extensions for the TECO editor. In 1984, Richard Stallman initiated GNU Emacs to provide a free alternative to the proprietary Gosling Emacs. While initially based on Gosling Emacs, Stallman replaced its original Mocklisp interpreter with a genuine Lisp interpreter, necessitating almost a complete rewrite. GNU Emacs marked the first official release under the GNU Project. Written primarily in C, it utilizes Emacs Lisp for extensibility. The debut public version, 13, was released on March 20, 1985, followed by version 15.34 later that same year. Early releases followed a "1.x.x" versioning scheme, which transitioned to "13" after version 1.12; subsequent digits indicated user site modifications. Presently, releases are denoted by two-part numbers, while development builds use three-part numbering.
Following its initial release, GNU Emacs was adapted for various Unix environments and quickly outpaced Gosling Emacs by providing a comprehensive Lisp extension language, establishing itself as the de facto Emacs editor on Unix systems. In 1986, a security vulnerability in GNU Emacs's email component was exploited by Markus Hess during a well-known hacking episode.
At first, development was restricted to a small group despite active user discussions on the net.emacs newsgroup, illustrating the "Cathedral" development approach described in The Cathedral and the Bazaar. From 1999 onward, GNU Emacs shifted to an open development model with public mailing lists and anonymous access via the Concurrent Versions System (CVS). Development was maintained on a single CVS trunk until 2008; since then, it has transitioned to using the distributed version control system Git.
While Richard Stallman has consistently been the primary maintainer, he has occasionally stepped back from direct involvement. Starting in 2008, maintenance responsibilities were shared by Stefan Monnier and Chong Yidong; Monnier resigned in 2015 and was succeeded by John Wiegley. Eli Zaretskii joined as co-maintainer in 2016 and Lars Ingebrigtsen followed in 2020. Wiegley stepped down in 2018; Ingebrigtsen completed his tenure with the release of Emacs 29.1, leaving Zaretskii as lead maintainer. Stefan Kangas became co-maintainer in 2023, with Andrea Corallo joining in 2024.
Licensing
The GNU General Public License (GPL) guarantees that the Emacs source code, encompassing both the C language and Emacs Lisp elements, remains openly accessible for inspection, alteration, and redistribution.
Earlier versions of GNU Emacs documentation were distributed under a custom license requiring inclusion of particular texts, such as instructions on obtaining GNU Emacs and Richard Stallman’s essay The GNU Manifesto. This licensing approach was carried over into XEmacs manuals from previous GNU Emacs editions. More recent documentation has transitioned to the GNU Free Documentation License, which includes "invariant sections" that mandate retaining these documents and labeling them as GNU Manuals.
For major code submissions, the Free Software Foundation (FSF) requests that contributors assign or waive their copyright rights to facilitate legal enforcement of the copyleft license; contributions smaller than ten lines are exempt from this requirement.
In 2011, it was disclosed that some GNU Emacs binaries had been distributed without corresponding source code for a period of two years, unintentionally breaching the GPL’s requirements. Richard Stallman described this as "a very bad mistake," which was quickly resolved. The FSF chose not to initiate legal proceedings against downstream distributors who unknowingly violated the GPL by sharing these binaries.
Commands
When operating in its default editing mode, GNU Emacs behaves like conventional text editors, enabling users to input text and navigate using arrow keys. Modified key combinations involving control, meta, alt, or super keys trigger functions within the Emacs Lisp environment. Commands such as save-buffer and save-buffers-kill-emacs often require multiple modified keystrokes.
Certain commands launch external applications—for example, ispell for spell checking or the GNU Compiler Collection (GCC) for compiling code. Emacs supports "inferior processes," which are persistent child processes communicating with the editor; this capability facilitates features like a Unix shell and REPL modes for various programming languages. Such integration promotes interactive programming environments similar to Interlisp or Smalltalk.
Users who prefer IBM Common User Access keyboard shortcuts can activate , a feature included since version 22.
Minibuffer
The "minibuffer," usually located on the bottom line of the screen, serves to show messages and prompt user input—tasks typically handled by dialog boxes in graphical editors. It temporarily holds information such as search terms or filenames, with command-line completion accessible through tab and space keys.
File management and display
Text content in Emacs is maintained within data structures called buffers, which may be visible on screen or exist solely in memory. Users are free to create or close buffers without restriction aside from available memory. Buffers can be saved upon exit and restored when restarting.
Some buffers correspond to files loaded from disk, allowing editing and saving back to storage. Others present command output, dired directory views, documentation, or notifications—elements that other editors might display in dialog boxes. Notifications typically appear briefly in the minibuffer ("echo area") or as longer messages within dedicated buffers marked by asterisks.
Buffers also function as input/output interfaces for external processes like shells or REPLs. Most Emacs keybindings operate uniformly across buffers; for instance, Ctrl-s isearch works within dired buffers, which can be toggled into writable mode to perform batch renaming using search-and-replace commands. Emacs supports image rendering and is both binary safe and 8-bit clean.
The editing window in Emacs is divided into multiple non-overlapping "windows"—rectangular areas independently refreshed—a design dating back to 1975 before modern graphical interfaces existed. Each window includes a mode line status bar. These windows function in both text-based terminals and graphical environments, enabling simultaneous display of multiple buffers or different parts of a single buffer. Common scenarios include viewing a dired directory listing alongside file contents, displaying source code while running compilation commands in a shell window, debugging alongside program output, or editing several related files concurrently.
Windows can be arranged in chains to present adjacent non-overlapping sections of a buffer with synchronized scrolling. Additionally, Emacs provides "narrowing," which limits the viewable portion of a file while adjusting navigation accordingly.
Windows are tiled without overlapping; however, Emacs allows multiple "frames," each acting as an independent window within graphical systems. On text terminals, frames occupy full screen and can be switched using standard commands.
Primary modes
GNU Emacs customizes its functionality via add-on modes known as "major modes," each designed to facilitate editing of specific text categories, such as source code for a wide range of programming languages, markup, web content, and system information displays. These major modes are implemented as Emacs Lisp scripts that optimize the editor for particular text formats. Typical capabilities include:
- Syntax coloring ("font lock") through the use of "faces"—combinations of fonts and colors that visually differentiate elements like keywords and comments.
- Automated indentation to maintain uniform code structure.
- Insertion of structural components including spaces, line breaks, and parentheses.
- Dedicated editing tools, such as function navigation or document validation in markup languages like XML.
Secondary modes
Minor modes provide additional layers of customization. Unlike major modes—limited to one active mode per buffer—multiple minor modes can be enabled concurrently. These can adjust document editing behavior; for instance, the C major mode incorporates minor modes catering to various indent styles. Others modify the editing environment itself, offering features like undoing window layout changes or real-time syntax verification. Minor modes also facilitate the coexistence of multiple major modes within a single file, enabling efficient management of embedded programming languages.
Batch operation mode
GNU Emacs is capable of running purely as an Emacs Lisp interpreter without launching its full text editor interface, known as batch mode. This mode bypasses user configuration files and allows standard terminal interrupt commands (C-c, C-z) to function normally for terminating or suspending processes. Through command line options, users can load and execute files or Emacs Lisp functions; once execution completes, Emacs outputs results before exiting. Utilizing the shebang line #!/usr/bin/emacs --script, users can create standalone Emacs Lisp scripts, supporting automation and scripting workflows in professional settings.
Documentation
The GNU Emacs Manual, authored by Richard Stallman, is distributed with GNU Emacs and accessible through the integrated info system. Additional documentation includes the Emacs Lisp Reference Manual, written by Bil Lewis, Richard Stallman, and Dan Laliberte, along with An Introduction to Programming in Emacs Lisp by Robert J. Chassell. These manuals are also available in published formats from the Free Software Foundation.
Globalization support
GNU Emacs accommodates a wide variety of alphabets, writing systems, and cultural norms, incorporating spell-checking capabilities for numerous languages via external tools such as ispell. Bidirectional text handling for languages like Arabic, Persian, and Hebrew was introduced starting with version 24.
It supports diverse character encodings including UTF-8, which became its default internal encoding beginning with version 23. XEmacs employs a similar but distinct internal encoding scheme.
Although the interface was initially developed in English and remains largely untranslated except for introductory tutorials, an accessibility subsystem named Emacspeak offers audio output to assist users with visual impairments.
Extensibility
The capabilities of GNU Emacs can be extensively expanded through the use of Emacs Lisp scripts that introduce new commands, buffer modes, keymaps, and command-line parameters. Numerous extensions create major modes designed for particular file formats or user interfaces, while others add minor modes or functions that improve pre-existing features.
Starting with version 24, GNU Emacs incorporates a native package manager (list-packages) that allows users to browse and install packages from ELPA repositories, including one overseen by the GNU Project. Many widely-used packages, once distributed via Usenet newsgroups, are now included by default—version 21 brought in notable additions such as Org-mode, Calc, and TRAMP.
Prominent packages consist of:
- AUCTeX, providing tools for editing and compiling TeX and LaTeX files
- Dired, a built-in file management utility
- Dissociated press, a generator for randomized text
- Dunnet, a text-based interactive fiction adventure
- Emacs Web Wowser (eww), an integrated web browser
- Emacs Speaks Statistics (ESS), supporting statistical programming languages like R and SAS
- ERC, an IRC client within Emacs
- Eshell, a shell implemented in Emacs Lisp offering deeper integration than traditional shells such as Bash or PowerShell
- Exwm, an X window manager enabling X11 applications to run inside Emacs frames
- Gnus, a versatile newsreader and email client
- Magit, a comprehensive Git interface for version control operations
- MULtilingual Enhancement to Emacs (MULE), which facilitates editing in multiple languages similar to Unicode support
- Org-mode, a robust system for note-taking, project organization, and document authoring in formats like PDF, HTML, or OpenDocument; includes literate programming capabilities through Babel
- Rcirc, another IRC client option
- Superior Lisp Interaction Mode for Emacs (SLIME), transforming GNU Emacs into a Common Lisp development environment equipped with debugging and inspection tools
- Texinfo (Info), an embedded online help reader
Performance
Earlier iterations of GNU Emacs experienced slower performance compared to competing editors due to the overhead associated with loading and interpreting its Lisp code. While modern hardware runs GNU Emacs smoothly, versions prior to 19.29 (released in 1995) were limited to editing files no larger than 8 MB. Later updates expanded this capacity significantly; 32-bit versions from 23.2 onward can handle files up to 512 MB, whereas 64-bit editions accommodate substantially larger buffers.
Although primarily implemented in Emacs Lisp, GNU Emacs also incorporates native C code and external libraries such as libxml2 to improve efficiency. Additionally, users can load dynamic modules through third-party packages.
With the introduction of version 28.1, Emacs gained support for native compilation of Emacs Lisp using libgccjit, resulting in considerable speed improvements compared to traditional byte-compilation.
Platforms
GNU Emacs is compatible with a wide range of operating systems including DOS, Windows, and most Unix-like platforms such as Linux, BSD variants, Solaris, AIX, HP-UX, and macOS. Many Unix-like environments come with Emacs pre-installed. An official port for Android was launched in 2023. Support for certain outdated platforms was dropped starting from version 23.1.
Emacs functions in both text-based terminals and graphical user interface (GUI) environments. On Unix-like systems, it can operate within the X Window System utilizing toolkits like Motif, LessTif, or GTK+. It also integrates seamlessly with native graphics frameworks on macOS and Windows, delivering interfaces consistent with each platform’s menus, toolbars, scrollbars, and context menus.
XEmacs
Originating from an early iteration of GNU Emacs 19, Lucid Emacs was initiated in 1991 by Jamie Zawinski and colleagues at Lucid Inc. The fork gained attention as the codebases increasingly diverged and collaborative merging ceased. Following Lucid Inc.'s bankruptcy, the project was rebranded as XEmacs. Development activity has diminished, with the most recent stable release dating back to 2009. Meanwhile, many features pioneered by XEmacs have been adopted into GNU Emacs, prompting some to consider XEmacs largely outdated.
Additional GNU Emacs Forks
Other less widely known forks consist of:
- Meadow, a version tailored for Windows users in Japan
- SXEmacs, Steve Youngs' derivative of XEmacs
- Aquamacs, which emphasizes seamless integration with Apple Macintosh’s user interface
- Remacs, a partial Rust language rewrite of GNU Emacs, discontinued as of 2023
- emacs-ng, designed to incorporate contemporary JavaScript development tools while preserving backward compatibility
Release history
Detailed information about each Emacs version is provided in the NEWS file included with the software package; notes regarding downgrades are found in a separate "Antinews" document.
| Version | Release Date | Key Enhancements |
|---|---|---|
| 30.1 | February 23, 2025 | Enabled native Lisp compilation by default; added native JSON handling; integrated Editorconfig support; included bundled which-key package; enhanced support for Android and touchscreen devices; various performance optimizations. |
| 29.4 | June 22, 2024 | Security update addressing vulnerabilities from earlier releases; blocked execution of arbitrary shell commands within Org mode. |
| 29.3 | March 24, 2024 | Security-focused release. |
| 29.2 | January 18, 2024 | Release primarily targeting bug corrections. |
| 29.1 | July 30, 2023 | Introduced Tree-sitter parser integration; pure GTK frontend supporting Wayland; bundled packages such as Eglot (LSP client), use-package manager, and csharp-mode. |
| 28.2 | September 12, 2022 | Bugfix update without feature additions. |
| 28.1 | April 4, 2022 | Implemented native Lisp compilation; incorporated HarfBuzz for text shaping and Cairo for rendering; added Secure Computing filter support; improved Emoji rendering; mode-specific commands introduced; default highlighting for matching parentheses. |
| 27.2 | March 25, 2021 | Focused on bug fixes. |
| 27.1 | August 10, 2020 | Added built-in support for arbitrary-size integers; implemented HarfBuzz text shaping; native JSON parser included; enhanced Cairo graphics support; replaced unexec with portable dumping method; adopted XDG conventions for init files; introduced early-init file; lexical-binding enabled by default; tab bar and tab-line features added; image resizing and rotation possible without ImageMagick. |
| 26.3 | August 28, 2019 | Updated GPG key used for ELPA package signature verification. |
| 26.2 | April 12, 2019 | Enabled external building of Emacs modules; upgraded Unicode compliance to version 11. |
| 26.1 | May 28, 2018 | Introduced limited concurrency through Lisp threads; optional line numbering feature added; double buffering to reduce flicker on X Window System; revamped Flymake syntax checking tool; new TRAMP method for Google Drive access; single-line horizontal scrolling mode implemented; systemd user unit file provided; support for true 24-bit color on capable terminals. |
| 25.3 | September 11, 2017 | Emergency security patch release. |
| 25.2 | April 21, 2017 | Bugfix update. |
| 25.1 | September 17, 2016 | Added dynamic library (module) support; TLS/SSL certificate validation included; electric-quote-mode introduced for smart quotes; character folding in isearch.el enhanced; native widgets embeddable within buffers; improved tools for Unicode character insertion. |
Additional resources
External resources
- Articles with short description
- Emacs
- Free and open-source Android applications
- Free file comparison utilities
- Free integrated development environments
- Free software developed in C
- Free software developed in Lisp
- Free text editing software
- GNU Project software
- Hexadecimal editors
- Linux integrated development environments
- Linux text editors
- MacOS text editors
- OpenVMS text editors
- Software licensed under the GNU General Public License
- Unix text editors
- Windows text editors
- Software released in 1985