Emacs has its own vocabulary for concepts that other editors name differently. Understanding these terms is essential because the entire help system, documentation, and community discourse uses them precisely.
003.1 Buffers
A buffer is the fundamental unit of content in Emacs. It is an in-memory workspace that may or may not correspond to a file on disk. When you open a file, Emacs creates a buffer holding a copy of its contents; edits happen in the buffer, not the file, until you explicitly save.
File-Visiting Buffers
Created by C-x C-f. The buffer name matches the filename. Saving (C-x C-s) writes the buffer back to disk. An asterisk * in the mode line means unsaved changes.
Special Buffers
Names wrapped in asterisks: *scratch* (Elisp playground), *Messages* (log), *Help* (docs), *Completions*. These do not correspond to files.
Buffer-Local Variables
Each buffer can have its own value for any variable. This is how different files get different tab widths, modes, or encoding settings. Use setq-local or make-local-variable.
Every buffer has exactly one major mode that determines its behavior. Use C-x b to switch buffers and C-x C-b to see all open buffers. Emacs can have hundreds of buffers open simultaneously with negligible memory cost.
003.2 Windows
In Emacs terminology, a window is a viewport into a buffer—a rectangular area of the screen that displays buffer contents. This is not what the operating system calls a window (Emacs calls that a frame).
| Keybinding |
Action |
Description |
| C-x 2 |
Split below |
Create a new window beneath the current one |
| C-x 3 |
Split right |
Create a new window beside the current one |
| C-x 0 |
Close window |
Delete the current window (buffer stays open) |
| C-x 1 |
Maximize |
Delete all other windows, keep current |
| C-x o |
Next window |
Move cursor to the next window |
Multiple windows can display the same buffer simultaneously. Each window maintains its own cursor position (point) and scroll position, so you can view two parts of a file side by side.
003.3 Frames
A frame is what your operating system calls a "window"—a top-level GUI container managed by the window manager. Each frame has its own set of Emacs windows, menu bar, and mode line. All frames share the same set of buffers.
| Keybinding |
Command |
Description |
| C-x 5 2 |
make-frame-command |
Create a new frame |
| C-x 5 0 |
delete-frame |
Delete the current frame |
| C-x 5 o |
other-frame |
Switch to the next frame |
Most Emacs users work in a single frame with multiple windows rather than multiple frames. However, multi-monitor setups benefit from frames—one per monitor, all sharing buffers.
003.4 Major Modes
Every buffer has exactly one major mode that defines its primary behavior: syntax highlighting, indentation rules, available commands, and keybindings. Major modes are mutually exclusive—activating one deactivates the previous.
Common Major Modes
- emacs-lisp-mode
- Editing Elisp files. Provides eval, completion, and debugging support.
- python-mode
- Python editing with indentation, shell integration, and virtualenv support.
- org-mode
- Outlining, task management, literate programming, and document export.
- fundamental-mode
- The bare minimum mode. No syntax highlighting or special behavior.
- text-mode
- Plain text editing. Parent mode for markdown-mode, rst-mode, and others.
- dired-mode
- Directory editor. Browse and manipulate files without leaving Emacs.
Emacs selects the major mode automatically based on the filename, file extension, or a special comment (-*- mode: foo -*-) at the top of the file. You can switch manually with M-x python-mode, M-x org-mode, etc.
003.5 Minor Modes
Minor modes are toggleable features that layer on top of the major mode. Multiple minor modes can be active simultaneously. They add functionality like spell checking, auto-saving, line numbering, or auto-completion.
flyspell-mode
On-the-fly spell checking. Underlines misspelled words. Use flyspell-prog-mode to check only comments and strings.
display-line-numbers-mode
Shows line numbers in the left margin. The global- variant enables it everywhere.
eldoc-mode
Shows function signatures and documentation in the echo area as you type. Active by default in Elisp buffers.
electric-pair-mode
Automatically inserts matching delimiters: parentheses, brackets, braces, and quotes.
Enable minor modes per-buffer with M-x flyspell-mode, or enable them automatically via hooks:
;; Enable minor modes via hooks:
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'prog-mode-hook 'eldoc-mode)
003.6 The Minibuffer & Echo Area
The minibuffer is the single-line input area at the very bottom of the frame. It is where Emacs prompts you for input: filenames (C-x C-f), command names (M-x), search strings (C-s), and more.
When the minibuffer is not active, the same space serves as the echo area, displaying status messages, errors, and brief notifications. Messages accumulate in the *Messages* buffer for later review.
Minibuffer Essentials
| Key |
Action |
| TAB |
Complete the current input (filename, command, variable) |
| C-g |
Abort the current minibuffer prompt |
| M-p / M-n |
Cycle through previous/next minibuffer history |
| RET |
Confirm the current input |
003.7 Point, Mark & Region
Emacs uses precise terminology for cursor position and text selection:
- Point
- The current cursor position. Every buffer has its own point. Functions like
(point) return the character offset. Point is always between two characters, not on a character.
- Mark
- A saved position in the buffer, set with
C-SPC (set-mark-command). The mark ring remembers previous mark positions; C-u C-SPC cycles through them.
- Region
- The text between point and mark. When the region is active (highlighted), commands like
C-w (kill) and M-w (copy) operate on it. Toggle visibility with transient-mark-mode.
;; Elisp functions for working with point and mark:
(point) ; Current cursor position (integer)
(mark) ; Current mark position
(region-beginning) ; Start of active region
(region-end) ; End of active region
(buffer-substring ; Extract text from region
(region-beginning)
(region-end))
The kill ring is Emacs's clipboard, but it stores multiple entries. After yanking with C-y, press M-y repeatedly to cycle through previous kills. This is one of Emacs's most productive features once internalized.