Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 38 ยท Getting Started

What Is Emacs?

Meet GNU Emacs: an extensible, self-documenting editor built around Lisp. Learn its history, its core ideas (buffers, commands, modes) and who benefits most.

Emacs is a text editor, but that description undersells it. It is better to think of Emacs as a small Lisp environment that happens to ship with an excellent text editor on top. Almost everything you see in it, from cursor movement to the file browser, is a Lisp function that you can read, call, change or replace while the editor is running.

This course teaches GNU Emacs, the most widely used version, from the first launch to a personal configuration, Org mode, version control and complete workflows. This first lesson explains what you are getting into and why people stay with Emacs for decades.

About this course. Emacs is a desktop program and it cannot run inside a web page. Every key sequence, menu name and command in these lessons is described exactly so you can follow along in your own copy of Emacs. Where an idea can be shown with code, the runnable examples are small JavaScript stand-ins that mimic how Emacs works. They are labelled "Stand-in" and are not Emacs itself.

A short history

Emacs began in 1976 at the MIT AI Lab as a set of macros for the TECO editor (the name was originally short for "Editor MACroS"). In 1984 Richard Stallman started the GNU Emacs project as a free-software rewrite, built on a new core written in C plus a Lisp dialect called Emacs Lisp (Elisp). GNU Emacs is still developed today, with a major release roughly every one to two years. Modern versions add native compilation of Elisp, built-in tree-sitter support for fast syntax parsing, an LSP client (Eglot), and much more.

The other famous editor family from that time is Vi and Vim. The two are often compared; both are excellent. Emacs favors key chords with modifier keys and deep extensibility. Vim favors modes and short commands. You can even mix them (a package called Evil gives Emacs Vim-style editing), but this course teaches native Emacs first.

The core ideas

Five ideas explain most of Emacs.

  1. Buffers. Text you edit lives in a buffer. A buffer may be linked to a file, or may be a scratch area, a shell, a Git status page or a manual. You see buffers through windows.
  2. Commands. Every action is a named function. forward-char, save-buffer and find-file are commands. A key is just a shortcut to a command. You can always call a command by name with M-x.
  3. Modes. A major mode (one per buffer, such as python-mode or org-mode) decides how the text is highlighted and indented. Minor modes (as many as you like) toggle extra features, such as auto-fill-mode or flymake-mode.
  4. Extensibility. Because the editor is written largely in Lisp, you customize it by evaluating Lisp. Changing a setting is a one-line expression.
  5. Self-documentation. Emacs can tell you what any key does, what any command is for and where its code lives. You learn the editor from inside the editor.

Emacs in five ideas

Buffers Text you edit
Commands Named functions
Modes Behavior per buffer

Everything else is built from these.

1 / 2

What people use it for

Emacs is a general text editing environment, so the list is long: writing code in dozens of languages, taking notes and planning with Org mode, writing papers, reading email and news, browsing directories (Dired), working with Git (Magit, the best-known add-on), running shells and REPLs, and even playing games. Nobody uses all of it. The usual path is to learn the editing basics, then add one area at a time.

Honest trade-offs

Emacs has a learning curve. The default key bindings use many Ctrl and Alt chords, and the default look is plain. In exchange you get one consistent tool that you can shape to your habits and that will still work in twenty years. If you want an editor that is configured for you out of the box, an IDE may be faster to start with; if you like to understand and tune your tools, Emacs rewards the effort.

A first taste of Lisp

Emacs Lisp code is written in parenthesized lists. The first item is the function; the rest are arguments. (+ 1 2) adds, (* 2 (+ 3 4)) nests. Later chapters teach this properly, but it helps to see the shape now. This stand-in is a tiny evaluator for such expressions, written in JavaScript. Real Elisp is far richer.

JS Stand-in: evaluate Lisp-style expressions

Press Run (or Ctrl + Enter) to see the console output here.

No output.

In real Emacs you can try the same thing in the *scratch* buffer: type (+ 1 2), put the cursor after the closing parenthesis and press C-x C-e. The result appears in the echo area at the bottom.

Where the course goes

You will install Emacs, learn to move and edit with its key bindings, master buffers, windows, the kill ring and undo, then spend a chapter on Org mode. Later chapters cover configuration, packages, programming modes, Git and complete workflows. Open the Emacs track page any time to see the full list.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the best description of Emacs?

    Most of Emacs is written in Emacs Lisp, so the editor can be inspected and changed while it runs.
  2. 2. What do you look at when you edit text in Emacs?

    Text lives in buffers; windows are the views onto them.
  3. 3. What is a minor mode?

    A buffer has one major mode and any number of minor modes.
  4. 4. Which Lisp expression adds 1 and 2?

    Lisp puts the function first inside parentheses: (+ 1 2).

Summary

  • Emacs is a Lisp-powered, extensible, self-documenting editor with a history going back to 1976 (GNU Emacs since 1984).
  • Text lives in buffers shown in windows; every action is a named command; modes control behavior.
  • You customize Emacs by writing Emacs Lisp, which is written as parenthesized lists.
  • The learning curve is real, and the payoff is a tool shaped around you.

Next: Installing Emacs