← All 169 books emacs, one buffer per page
One buffer per page

emacs, one buffer per page

Twenty-eight lessons on what emacs is: a family of extensible text editors whose manual describes the extensible, customizable, self-documenting, real-time display editor; the law of one buffer per page; the buffer as a memory region with attributes, point, mark and the region, the visiting file, one major mode with many minor ones; buffers as the live unit everything else arranges around, help text, directory listings, shell output and messages all in buffers; windows as views, frames and the headless server, the mode line, the minibuffer and the echo area; the buffer list, the star names, the scratch pad, killing buffers on purpose; Emacs Lisp beneath, the C-x 2 split, the Org outline, batch with no display; the vim neighbour and its modes, the size ladder, the fifty-year line, teaching a friend in one sitting.


Steve Hodgkiss 7 lessons

One buffer, named, visited, listed and killed on purpose. That's the living editor.

emacs, one buffer per page

Twenty-eight lessons on what emacs is: a family of extensible text editors whose manual describes the extensible, customizable, self-documenting, real-time display editor; the law of one buffer per page; the buffer as a memory region with attributes, point, mark and the region, the visiting file, one major mode with many minor ones; buffers as the live unit everything else arranges around, help text, directory listings, shell output and messages all in buffers; windows as views, frames and the headless server, the mode line, the minibuffer and the echo area; the buffer list, the star names, the scratch pad, killing buffers on purpose; Emacs Lisp beneath, the C-x 2 split, the Org outline, batch with no display; the vim neighbour and its modes, the size ladder, the fifty-year line, teaching a friend in one sitting.


Set in Space Grotesk, Inter and JetBrains Mono (SIL Open Font License).

An honest no-demo book: there is no emacs binary on the machine that built it (verified at dispatch), so it was written by a machine that never opened a buffer. Every fact is as the primary source states it, fetched and read during this build: the Wikipedia articles Emacs, GNU Emacs, Emacs Lisp, Org-mode, GNU Project and Vim (text editor), cached verbatim beside this book. No Emacs command was run, no buffer was captured, and no output in these pages is quoted as a local run. No facts come from Reddit, Stack Overflow, vendor blogs or commercial sites. Every lesson that describes a practice exercise carries the label 'this book's plan', never posing as a captured fact. Independent, not affiliated with the GNU Project or the Wikimedia Foundation.

Your purchase is for personal use only. You do not have redistribution rights: please do not share, resell, or republish this book or its pages.

© 2026 Steve Hodgkiss. All rights reserved. Personal use only; no redistribution rights.

Edition 1.0 · stevehodgkiss.net

Contents

Contents


Part 1 · The live unit
The law first4
Part 2 · The buffer's parts
The visiting file5
Part 3 · Everything is a buffer
The messages buffer6
Part 4 · Windows and frames
The minibuffer7
Part 5 · The list and its life
Killing buffers8
Part 6 · The living system
C-x 2, the split9
Part 7 · The long view
Teaching a friend10

Per the Wikipedia GNU Emacs article, the program's tagline is "the extensible self-documenting text editor." Per this book's plan, the law of this book is: no fact unless a cached source line holds it, no invented Emacs output anywhere, because no Emacs ran on this machine, and every practice exercise labelled as this book's plan.

Emacs companion · No. 01
the law

The law first

honest sources, no invented output

the law before the first page: honest sources, no invented runsno emacs binary on themachine that built thisthis book's law: everyfact traced to a source linethe subject sets the standard:its tagline is the extensibleself-documenting text editor,so the book documents itself:which article, which line;and no exercise poses as acaptured fact; none ever wasan honest no-demo book, written without ever opening a buffer

Before the first page, the law. There is no emacs binary on the machine that built this book: no Emacs ran, no buffer was ever opened here, and no output in these pages pretends otherwise.

So every fact is traced to a line of the cached Wikipedia sources fetched at build time, and each exercise carries the label this book's plan.

The subject deserves it: the program's tagline is the extensible self-documenting text editor, and an honest book about it documents itself the same way.

ONE HONEST BUFFER

Before trusting any technical page, ask the book's own question: which source line holds this, and did a demo really run?

Per the Wikipedia Emacs article, the buffer's attributes include the name and inode of the file the buffer is visiting, if any. Per the Wikipedia GNU Emacs article, some buffers contain text loaded from text files, which the user can edit and save back to permanent storage, and these buffers are said to be visiting files; commands such as save-buffer and save-buffers-kill-emacs combine multiple modified keystrokes.

Emacs companion · No. 02
the file

The visiting file

the buffer is the copy you edit

the buffer visits the file; the file never owns the buffernotes.txtthe file: the permanentcopy, saved or stalethe buffer: your live copysave-buffervisiting: text loaded froma file, editable, saveableediting happens in the copy;saving writes permanent storageyou edit the visiting copy, then choose when the file learns

The honest relation between file and buffer. Per the article, the buffer holds the name and inode of the file the buffer is visiting (if any).

And the article is explicit: some buffers contain text loaded from text files, which the user can edit and save back to permanent storage. These buffers are said to be "visiting" files.

Visiting, not owning. The buffer is the live copy; the file is the permanent one. Commands like save-buffer and save-buffers-kill-emacs are the bridge.

ONE HONEST BUFFER

Point at your open file and say which side you are touching: the visiting copy, or permanent storage?

Per the Wikipedia GNU Emacs article, some notifications are displayed briefly in the minibuffer, and GNU Emacs provides a *Messages* buffer that keeps a history of the most recent notifications of this type, longer notifications are displayed in buffers of their own, and when the minibuffer is used for output from Emacs it is called the echo area.

Emacs companion · No. 03
the log

The messages buffer

the echo area keeps a history

brief flashes below, kept forever in a buffer of their owna frame, its bottom line:one brief message, gone*Messages* keeps the historyof recent notificationswhen the minibuffer showsoutput it is called theecho area, per the article;longer notifications getbuffers of their ownnothing worth saying is said only once in a buffer world

Messages you thought you missed are kept. Per the article, some notifications are displayed briefly in the minibuffer, and GNU Emacs provides a *Messages* buffer that keeps a history of the most recent notifications of this type.

When the minibuffer is used for output, it is called the "echo area". Longer notifications are displayed in buffers of their own.

The pattern again: anything worth showing becomes a buffer, even the editor's own chatter. One buffer per kind of truth.

ONE HONEST BUFFER

Recall the last message a tool flashed at you and lost; name the buffer that would have kept it.

Per the Wikipedia GNU Emacs article, Emacs uses the minibuffer, normally the bottommost line, to display messages and request information, functions often performed by dialog boxes in GUI editors, and when applicable command-line completion is available using the tab and space keys. Per the Wikipedia Emacs article, the bottom of every frame is used for output messages, then called the echo area, and text input for commands, then called the minibuffer.

Emacs companion · No. 04
the input line

The minibuffer

the line that asks and tells

one line at the frame's bottom asks and tellsthe frame's work area above,buffers in windows filling itwhile the bottom line waitsecho areaminibufferoutput messages: echo area;text input for commands:minibuffer; the same line,two jobs, per the article,completion on the tab andspace keys, when applicablethe question and the answer share one honest line

The one line that talks back. Per the article, Emacs uses the "minibuffer," normally the bottommost line, to display messages and request information, work that GUI editors hand to dialog boxes.

It is where you answer: file names to read or save, text to look for. And command-line completion is available using the tab and space keys.

One strip, two names: the frame's bottom is used for output messages (then called 'echo area') and text input for commands (then called 'minibuffer').

ONE HONEST BUFFER

Count the dialog boxes your tools raise per hour; Emacs folds that whole conversation into one line.

Per the Wikipedia GNU Emacs article, the user can create new buffers and dismiss unwanted ones, and many buffers can exist at the same time, limited only by available memory; some buffers contain text loaded from text files, which the user can edit and save back to permanent storage; commands such as save-buffer and save-buffers-kill-emacs combine multiple modified keystrokes.

Emacs companion · No. 05
the end

Killing buffers

dismiss the ones you are done with

dismissal is a first-class act, not a crashnotes.org*scratch**shell*saved to diskthe user can createand dismiss, per thearticle; save first,then killsave-buffer writes the copy back;save-buffers-kill-emacs ends allsave the visiting copy, then let the buffer go, on purpose

Buffers end on purpose. Per the article, the user can create new buffers and dismiss unwanted ones; dismissal is a first-class act, not a crash.

The honest order before the end: buffers contain text loaded from text files, which the user can edit and save back to permanent storage, via save-buffer. The final keystrokes have a final name: save-buffers-kill-emacs.

Per this book's plan: save the visiting copy, then dismiss, and let the list shrink back to buffers you can name.

ONE HONEST BUFFER

Say the order aloud before you close anything: save the visiting copy first, then dismiss the buffer.

Per the Wikipedia Emacs Lisp article, users can press the default C-x 2 key binding to open a new window, which runs the Emacs Lisp function split-window-below, and normally the new window displays the same buffer as the previous one; the article's example rebinds C-x 2 to a function that calls set-window-buffer with next-window and other-buffer, and a buffer is a region of text loaded into Emacs' memory, possibly from a file, which can be saved into a text document.

Emacs companion · No. 06
the split

C-x 2, the split

two windows, the second buffer

C-x 2 splits the window; the buffer does not multiplyC-x 2split-window-below, per articlestill the samebuffer as beforethe other bufferafter the rebound(set-window-buffer (next-window) (other-buffer))the article's example codea split never opens a file; it points another window at a buffer

The one-key proof that windows are views. Per the article, users can press the default C-x 2 key binding to open a new window, which runs split-window-below, and normally the new window displays the same buffer as the previous one.

The article's example changes that with three calls: set-window-buffer pointed at next-window and other-buffer.

No file is opened by a split; a window is pointed at a buffer, a region of text in memory, possibly from a file.

ONE HONEST BUFFER

Split any window you own and ask what the new pane shows; the honest answer is a buffer, not a file.

Per the Wikipedia Emacs article, Emacs also has a built-in tutorial, the tutorial is by Stuart Cracraft and Richard Stallman, and Emacs displays instructions for performing simple editing commands and invoking the tutorial when it is launched with no file to edit. Per this book's plan, the last lesson hands the buffer habit to a friend in one sitting.

Emacs companion · No. 07
the handoff

Teaching a friend

one sitting, four moves

the handoff: four moves, one sitting, one honest habit1234name thebufferread themode lineopen thebuffer listkill whatis donea built-in tutorial shows when it is launched with no fileto edit, by Stuart Cracraft and Richard Stallmanteach four moves and the fifty-year editor feels explainable

The handoff, per this book's plan, is one sitting and four moves: name the buffer, read the mode line, open the buffer list, kill what you are done with.

The friend is not alone in the machine either: Emacs also has a built-in tutorial, shown when it is launched with no file to edit.

The credit line belongs to two people: the tutorial is by Stuart Cracraft and Richard Stallman. A fifty-year editor that explains itself is the easiest thing you will ever teach.

ONE HONEST BUFFER

Teach the four moves today; a friend who can name their buffers has already left the crowd.

Index

Index


C-x 2, the split9
Killing buffers8
Teaching a friend10
The law first4
The messages buffer6
The minibuffer7
The visiting file5