kids encyclopedia robot

GNU Emacs facts for kids

Kids Encyclopedia Facts
Quick facts for kids
GNU Emacs
Current GNU Emacs logo
Current GNU Emacs logo
GNU Emacs 26.2 screenshot.png
GNU Emacs 26.2 running on GNOME 3
Original author(s) Richard Stallman
Developer(s) GNU Project
Initial release 20 March 1985; 40 years ago (1985-03-20)
Stable release
30.1 Edit this on Wikidata / 23 February 2025
Preview release
30.0.93 Edit this on Wikidata / 19 December 2024
Written in Emacs Lisp, C
Operating system Unix-like (GNU, Linux, macOS, BSDs, Solaris), Windows, MS-DOS, Haiku
Platform Cross-platform
Available in English
Type Text editor
License GPL-3.0-or-later

GNU Emacs is a special kind of text editor and a collection of free software tools. It's like a super-powered notepad for computers. Richard Stallman, who started the GNU Project, began creating GNU Emacs in 1984. He based it on an older editor called Emacs, which was made for Unix computers. GNU Emacs became a very important part of the GNU project and a key example of the free software movement.

The program's motto is "the extensible self-documenting text editor." This means you can easily add new features to it, and it also helps you learn how to use it. Most of what GNU Emacs can do is built using a special programming language called Emacs Lisp. This allows users to change how it works or add new tools. Some things it can do include browsing files (Dired), a powerful calculator (Calc), an email and news reader (Gnus), and a helpful system for organizing tasks called Org-mode. Many people have also created their own additions, like a tool for Git (Magit) and ways to make it work with different programming languages.

History of GNU Emacs

Richard Stallman - Fête de l'Humanité 2014 - 010
Richard Stallman, the person who started the GNU Project and created GNU Emacs.

The very first Emacs was made in 1976. Later, in 1984, Richard Stallman started working on GNU Emacs. He wanted to create a "free software" version to replace other programs that people had to pay for. GNU Emacs was first based on another program, but Stallman rewrote almost all of its code. This new program became the first one released by the new GNU Project.

GNU Emacs is written using the C programming language. It also uses Emacs Lisp as a way for users to add new features. The first public version, called Version 13, came out on March 20, 1985. Over time, GNU Emacs became very popular on Unix computers. It offered more features than other editors, especially its full Lisp language for extensions.

For a long time, only a few people were involved in making big changes to GNU Emacs. But since 1999, more people have been able to help develop it. Richard Stallman was the main person in charge of GNU Emacs for many years. Other people have also helped maintain it, like Stefan Monnier, Chong Yidong, John Wiegley, Eli Zaretskii, Lars Ingebrigtsen, Stefan Kangas, and Andrea Corallo.

How GNU Emacs is Licensed

GNU Emacs uses the GNU General Public License (GPL). This license means that the program's code is free for anyone to look at, change, and share. This includes both the C and Emacs Lisp parts of the code.

The manuals for GNU Emacs also have special licenses. These licenses allow people to share and change the manuals, but they must include certain parts of the original text. This is part of the "free software" idea, making sure that important information stays with the software.

The Free Software Foundation (FSF) asks people who contribute a lot of code to Emacs to give them the copyright. This helps the FSF protect the software if someone tries to break the rules of the GPL license.

Using GNU Emacs

Emacs Dired buffers
Editing multiple Dired buffers in GNU Emacs.
GNU Emacs editing C code
Editing C source code in GNU Emacs.
Cpp in GNU emacs
Editing and compiling C++ code from GNU Emacs.

Basic Commands

When you use GNU Emacs, it acts like a normal text editor. You can type text and move around with the arrow keys. To do more advanced things, you use special key combinations. These often involve holding down the control key, meta key, alt key, or super key with another key. For example, some commands combine several key presses to save your work or close the program.

GNU Emacs can also work with other programs. It can use a spell-checker or a compiler (which turns code into a program). It can even run a Unix shell (a command-line interface) right inside Emacs. This makes it very useful for programmers. If you prefer common keyboard shortcuts, Emacs has a special mode called `cua-mode` that makes it work more like other popular editors.

The Minibuffer

At the bottom of the Emacs screen, there's a small area called the "minibuffer." This is where Emacs shows you messages and asks for information. For example, if you're searching for text, you'll type what you're looking for in the minibuffer. It also helps you complete commands or file names by suggesting options as you type.

Managing Files and Display

Emacs stores text in something called "buffers." Think of a buffer as a temporary workspace for your text. You can have many buffers open at once, limited only by your computer's memory. You can create new buffers, close old ones, and even set Emacs to remember which buffers were open when you last closed it.

Some buffers hold text from files you've opened, which you can edit and save. Other buffers show you different kinds of information, like lists of files in a directory (dired), help messages, or notifications. Emacs often names its own special buffers with asterisks around them, like `*Messages*`, to show they are not regular files.

Most Emacs commands work in any buffer. For example, you can search for text in a file list just like you would in a regular text file. You can even change file names in a directory list and save those changes. Emacs can also display image files directly within its buffers.

Emacs can split its screen into different sections called "windows." These "windows" are like separate panes where you can see different parts of a file or different files at the same time. This is helpful if you want to see your code in one window and the results of running it in another. Each Emacs window has a "mode line" at the bottom that shows you information about what you're doing. Emacs can also open multiple "frames," which are like separate program windows on your computer's desktop.

Major Modes

GNU Emacs can change how it works depending on what kind of text you're editing. It does this by using "major modes." There are major modes for regular text files, for many different programming languages, and even for viewing web pages or directory listings. Each major mode adds special features to make editing that type of text easier.

Major modes often provide:

  • Syntax highlighting: This uses different colors and fonts to make parts of your text stand out, like keywords or comments in programming code.
  • Automatic indentation: This helps keep your text neatly organized.
  • Automatic insertions: It can automatically add things like spaces or parentheses that are needed for the document's structure.
  • Special commands: These are commands that are useful for that specific type of text, like jumping to the start of a function in a programming file.

Minor Modes

Besides major modes, Emacs also has "minor modes." You can use several minor modes at the same time with one major mode. Minor modes add smaller, extra features. For example, a minor mode might help you undo changes to your window layout, or check your spelling as you type. There's even a minor mode that lets you use multiple major modes in one file, which is handy if you have different programming languages mixed together.

Batch Mode

GNU Emacs can also run without showing its usual editor screen. This is called "batch mode." In this mode, Emacs acts like a program that just runs commands written in Emacs Lisp. It's useful for running scripts or doing automated tasks without needing to open the full editor.

Manuals

The GNU Emacs Manual, written by Richard Stallman, comes with GNU Emacs. You can read it right inside Emacs using a special browser. There are also other manuals, like the Emacs Lisp Reference Manual, which helps you learn the Emacs Lisp programming language. All these manuals are also available as books.

Internationalization

GNU Emacs supports many different alphabets, writing systems, and languages. It can also help you check spelling in many languages. Since version 24, it can even handle text that reads from right to left, like Arabic or Hebrew.

Emacs understands many ways of encoding characters, including UTF-8. This means it can display text correctly from almost any language. While the main Emacs interface is in English, there's a special system called Emacspeak that helps visually impaired and blind users use the editor with audio feedback.

Adding New Features (Extensibility)

Emacs+AucTeX
GNU Emacs with AUCTeX, a set of tools for editing TeX and LaTeX documents.

You can change and add to GNU Emacs almost endlessly by writing programs in Emacs Lisp. These programs can create new commands, new modes, and more. Many of these additions create new "major modes" for different file types or new "minor modes" that add small features.

Since version 24, GNU Emacs has a built-in "package manager." This makes it easy to find and install new features and tools that other users have created. Many popular tools, like Org-mode and Calc, are now included with Emacs by default.

Example Org file showing planning for a short trip
An Org-mode buffer showing notes for planning a trip.
GNU Emacs showing a Magit buffer
A Magit buffer showing the history of changes in a Git project.

Some popular additions include:

  • AUCTeX: Tools for editing TeX and LaTeX documents.
  • Dired: A file manager that works inside Emacs.
  • Emacs Web Wowser (eww): A web browser built into Emacs.
  • ERC: An IRC client for chatting online.
  • Eshell: A command-line shell written in Emacs Lisp, which works very well with Emacs.
  • Exwm: An X window manager that lets you run other programs inside an Emacs window.
  • Gnus: A powerful program for reading news and emails.
  • Magit: A great tool for working with Git, a system for tracking changes in code.
  • Org-mode: A very popular tool for taking notes, making lists, planning projects, and writing documents.
  • Superior Lisp Interaction Mode for Emacs (SLIME): Turns Emacs into a full development environment for Common Lisp programming.

Performance

In the past, GNU Emacs sometimes ran slower than other text editors. This was because it had to load and run its Lisp-based code. However, modern computers are much faster, so GNU Emacs runs easily today. Older versions also had limits on how large a file they could open, but newer versions can handle very large files.

Even though much of GNU Emacs is written in Emacs Lisp, it also uses parts written in C, which makes it faster. It can also use other special libraries and load extra modules to improve its speed. Since version 28.1, Emacs can even compile its Lisp files directly into faster code, giving it a big performance boost.

Platforms

GNU Emacs works on many different operating systems. This includes DOS, Windows, and most Unix-like systems like Linux, macOS, and others. Many Unix-like systems even come with Emacs already installed. In 2023, an official version for Android was released.

GNU Emacs can run both in a simple text terminal (like a command prompt) and in graphical environments (with windows and menus). On Unix-like systems, it can use the X Window System to create its graphical look. It can also use the graphics systems built into macOS and Windows, so it looks more like other programs on those systems.

Other Versions (Forks)

Sometimes, a software project splits into different versions, called "forks." This happens when different groups of developers decide to take the code in different directions.

XEmacs

Xemacs-21.5.b29
XEmacs 21.5 running on GNU/Linux.

One well-known fork of GNU Emacs is called XEmacs. It started in 1991. For a while, GNU Emacs and XEmacs developed separately. However, XEmacs development has slowed down a lot, and GNU Emacs has added many of the features that used to be only in XEmacs.

Other Emacs Versions

There are other versions of Emacs too, though they are not as well known as XEmacs. These include:

  • Meadow: A version for Microsoft Windows, popular in Japan.
  • SXEmacs: Another version based on XEmacs.
  • Aquamacs: A version designed to work very well with the Apple Macintosh computers.
  • Remacs: An attempt to rewrite parts of Emacs using the Rust programming language, but it is no longer being worked on.
  • emacs-ng: A project trying to add modern web technologies like Javascript to Emacs.

Release History

The changes in each new version of Emacs are listed in a special file called NEWS. This file explains all the new features and fixes.

Version history of GNU Emacs
Version Release date Significant changes
30.1 February 23, 2025 Lisp files are now compiled by default for better speed. It includes built-in support for Editorconfig files and the popular which-key package. There's also better support for Android and touchscreens, along with many performance improvements.
29.4 June 22, 2024 This was a security update.
29.3 March 24, 2024 This was a security update.
29.2 January 18, 2024 This was a bug fix update.
29.1 July 30, 2023 Added integration with Tree-sitter for better code understanding and a new GTK interface for Wayland support. It also included popular packages like Eglot (for language server protocol) and use-package (for managing packages).
28.2 September 12, 2022 This was a bug fix update with no new features.
28.1 April 4, 2022 Introduced native compilation of Lisp files for faster performance. It also improved how text and emojis are displayed and added support for secure computing filters.
27.2 March 25, 2021 Mainly a bug fix update.
27.1 August 10, 2020 Added built-in support for very large numbers and improved text display. It also included native support for JSON files and better drawing capabilities.
26.3 August 28, 2019 Updated the GPG key for checking package signatures.
26.2 April 12, 2019 Emacs modules can now be built separately. It also became compliant with Unicode version 11.0.
26.1 May 28, 2018 Added a limited form of running multiple tasks at once with Lisp threads. It also included optional line numbers and used double buffering to reduce screen flicker.
25.3 September 11, 2017 An emergency update to fix a security problem.
25.2 April 21, 2017 Mainly a bug fix update.
25.1 September 17, 2016 Added support for loading shared libraries (modules) and validating TLS/SSL certificates. It also included a new mode for curved quotes and improved Unicode character insertion.
24.5 April 10, 2015 Mainly a bug fix update.
24.4 October 20, 2014 Added support for access control lists (ACLs) and digital signatures for Emacs Lisp packages. It also improved fullscreen and multi-monitor support.
24.3 March 10, 2013 Generalized variables were added to core Emacs Lisp, and a new major mode for Python was included.
24.2 August 27, 2012 A bug fix update.
24.1 June 10, 2012 Introduced ELPA (Emacs Lisp Package Archive) for easy package management, native color themes, and support for bi-directional input.
23.4 January 29, 2012 Fixed a security flaw.
23.3 March 10, 2011 Improved features for using Emacs with version control systems.
23.2 May 8, 2010 Added new tools for using Emacs as an IDE, including project navigation. The cursor is now hidden while typing in graphical interfaces.
23.1 July 29, 2009 Added support for smoother fonts on X, better Unicode support, and new ways to view PDF and PostScript files. It also updated its graphical interface on macOS.
22.3 September 5, 2008 Added GTK+ toolkit support, better mouse support, and an improved keyboard macro system. It also included new modes for Python and the mathematical tool Calc.
22.2 March 26, 2008 Added new support for various version control systems like Bazaar and Git. It also included new major modes for editing CSS and other file types.
22.1 June 2, 2007 Added support for the GTK+ graphical toolkit and drag-and-drop on X. It also included org-mode version 4.67d.
21.1 October 20, 2001 Added support for displaying colors and other features on terminals. It also included built-in horizontal scrolling, sound support, and improved Unicode support.
20.1 September 17, 1997 Added multi-lingual support.
19.34 August 22, 1996 A bug fix update with no visible changes for users.
19.31 May 25, 1996 Emacs started opening X11 frames by default and added scroll bars on Windows 95 and NT. It also included a feature to recover multiple files after a crash.
19.30 November 24, 1995 Added support for multiple frames on MS Windows and made the menu bar available on text terminals.
19.29 June 19, 1995 Brought big improvements to how fast Emacs ran, how it handled fonts, and how it displayed images. It also improved international features and added more ways to customize it.
19.28 November 1, 1994 The first official version 19 release. It added support for multiple frames using the X Windowing System and a new interface for version control systems.
18.59 October 31, 1992 Included improvements and bug fixes compared to earlier Emacs 18.x versions.
18.53 February 23, 1989 Introduced support for "font-locking," which allowed syntax highlighting (coloring code) in different programming modes. This made code much easier to read.
18.52 August 17, 1988 Introduced `spook.el`, a library for adding certain keywords to messages.
18.24 October 2, 1986 Added server mode and the ability for Emacs to open TCP connections.
17.36 December 20, 1985 Introduced backup file version numbers.
16.56 July 15, 1985 The first Emacs 16 release. It separated Emacs-lisp-mode from lisp-mode and removed all code from Gosling Emacs due to copyright issues.
13.8? March 20, 1985 The very first release.

Images for kids

kids search engine
GNU Emacs Facts for Kids. Kiddle Encyclopedia.