Emacs Tutorial
Learn Emacs step by step: 38 lessons in 9 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
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.
- Installing Emacs Install GNU Emacs on Windows, macOS or Linux, check the version, learn where the init file lives, and start it as a window, in a terminal or as a daemon.
- A Tour of the Emacs Window Learn the parts of the Emacs screen: frame, window, buffer, mode line, echo area and minibuffer, the scratch buffer and the menu bar, and how to read the mode line.
- Key Notation and the Help System Read Emacs key notation (C-, M-, RET, DEL, prefix keys), fix a missing Meta key, and use C-h k, C-h f, C-h v, C-h m and the info manual to learn the editor.
Basics and Navigation
- Moving the Cursor Learn Emacs navigation: characters, words, lines, sentences, paragraphs, pages, buffer ends, go to line, recenter, and Lisp-aware movement by expressions and defuns.
- Files, Saving and Quitting Open and save files in Emacs with find-file, save-buffer, write-file and save-some-buffers. Understand backups, auto-save, recover-this-file and how to quit safely.
- Incremental Search and Query Replace Search as you type with C-s and C-r, use regexp, word and symbol search, list matches with occur, and replace text interactively with M-% and C-M-%.
- The Minibuffer and M-x Use the Emacs minibuffer: run any command with M-x, complete names with TAB, browse history, repeat commands, and know how completion styles and fido-mode work.
- Prefix Arguments and Repeating Give Emacs commands a count with C-u, C-u C-u and M-digit, understand negative and raw prefix arguments, and use them to repeat, move and insert text quickly.
Editing and Buffers
- The Kill Ring and Yanking Understand Emacs cut and paste: killing versus deleting, the kill ring, C-y and M-y, appending kills, the clipboard connection and the commands that kill text.
- The Mark, the Region and Selection Select text in Emacs with the mark and the region: C-SPC, C-x C-x, mark-word, mark-paragraph, mark-whole-buffer, the mark ring and transient mark mode.
- Undo and Redo Emacs treats undo as an editing command. Learn C-/, C-x u, undo in region, how redo works in Emacs 28+, and why the undo history never loses a change.
- Buffers and Ibuffer Work with many buffers: switch with C-x b, list with C-x C-b and Ibuffer, kill and rename buffers, understand special buffers like *scratch* and *Messages*, and read-only mode.
- Windows and Frames Split the Emacs screen into windows with C-x 2 and C-x 3, switch with C-x o, resize and balance, scroll the other window, open new frames, and undo layouts with winner-mode.
- Rectangles, Registers and Keyboard Macros Edit columns with rectangle commands, store text and positions in registers, and record and replay keyboard macros with F3, F4, C-x e and counters.
Org Mode
- Org Mode Basics: Outlines, Lists and Links Start with Org mode: create headings, fold and unfold with TAB, restructure outlines, write lists and inline markup, add links, and use structure templates for code blocks.
- Org TODO Items, Tags and Properties Turn Org headings into tasks: TODO and DONE states, custom keyword sequences, priorities, tags, checkbox lists with progress cookies, properties and column-friendly metadata.
- Org Agenda, Scheduling and Capture Plan with Org: timestamps, SCHEDULED and DEADLINE, repeaters, the weekly agenda and TODO lists, tag and property searches, org-agenda-files, and capture templates for quick notes.
- Org Tables, Code Blocks and Export Build aligned Org tables with formulas, run code in Org Babel source blocks, tangle code into files, and export Org documents to HTML, PDF, Markdown and more.
Configuration and Elisp
- The Emacs Init File, early-init.el and the Customize Interface Learn where Emacs looks for your init file, what early-init.el is for, how Customize writes settings, and how to debug a broken configuration safely.
- Emacs Lisp Expressions, Lists and Variables Learn the core of Emacs Lisp: prefix expressions, quoting, lists and cons cells, strings, symbols, setq, let, and how to evaluate code inside Emacs.
- Elisp Functions, Control Flow and Lexical Binding Define your own Emacs commands with defun and interactive, use when, cond, dolist and mapcar, and understand lexical versus dynamic binding.
- Emacs Key Bindings, Hooks and Advice Bind your own keys with keymaps, use-package style :bind, attach functions to hooks, and change existing commands safely with advice-add.
Packages and Programming Modes
- Emacs Package Management: package.el, MELPA and use-package Install Emacs packages from GNU ELPA and MELPA, understand archives and dependencies, and organize your configuration with the built-in use-package macro.
- Minibuffer Completion: Vertico, Orderless, Marginalia and Consult Understand Emacs completion styles and the modern stack of Vertico, Orderless, Marginalia, Consult and Embark, with a configuration you can paste in.
- Programming in Emacs: Major Modes, Eglot (LSP) and Tree-sitter How Emacs chooses a major mode, how to get language-server features with Eglot, what Tree-sitter modes add, and the built-in tools for code navigation.
- Completion at Point, Snippets and Diagnostics in Emacs Set up in-buffer completion with Corfu or Company, expand templates with snippets, and see errors with Flymake while you type, using real Emacs configuration.
Version Control and Tools
- Magit: A Complete Git Interface in Emacs Learn Magit, the Git porcelain for Emacs: open the status buffer, stage hunks and lines, commit, branch, merge, rebase, push and read history with single keys.
- Dired and TRAMP: Managing Local and Remote Files in Emacs Use Dired to browse, mark, copy, rename and bulk-edit files, and TRAMP to open remote files over SSH or edit as root, with the exact keys and file name syntax.
- Shells, Compilation, grep and Project Search in Emacs Run commands from Emacs: shell-command, shell, eshell and vterm, the compile and next-error workflow, grep and occur search, and project.el for project-wide work.
Workflows
- Keyboard Macros, Registers and Bookmarks in Emacs Record and replay keyboard macros, run them on many lines, save text and positions in registers, and use bookmarks to return to files, with exact key sequences.
- The Emacs Server, emacsclient and Session Persistence Start Emacs once and connect with emacsclient, run it as a daemon or service, use it as your EDITOR, and persist history, recent files and sessions.
- Writing and Note-taking Workflows in Emacs Make Emacs a comfortable writing tool: visual line wrapping, spell checking with Flyspell, Markdown and LaTeX modes, rectangles, and linked notes with Denote.
Projects and Practice
- Project: Build a Minimal, Fast init.el from Scratch Build a tidy Emacs configuration in stages: sane defaults, interface, packages with use-package, completion, Git, and a checker that lints your init file.
- Project: A Daily Planner from Org-style TODO Headings Plan your day the Emacs way: write TODO headings with priorities and dates, learn how the Org agenda collects them, and build a small planner that mirrors it.
- Project: Write Your Own Emacs Minor Mode (Writing Goal Tracker) Create a real Emacs minor mode that shows word-count progress in the mode line: defcustom, define-minor-mode, keymaps, hooks and a packaging checklist.
- Practice: Emacs Key Drills, Key Notation and Self-Testing Build muscle memory with graded Emacs drills for movement, editing, windows and buffers, learn the key notation used in docs and kbd strings, and quiz yourself.
- Emacs Troubleshooting, Bisecting Config and Performance Tuning Find and fix Emacs problems: read backtraces, bisect a broken config, profile slow commands, cut startup time, and handle long lines and large files.