YouTube Summaries

← All summaries

completion-preview-mode Paired With the Emacs 31 Completions Buffer

2026-08-29 Sat ⏱ 9 min protesilaos

Protesilaos demonstrates the built-in completion-preview-mode combined with the default Completions buffer, which in Emacs 31 updates eagerly as you type. The pairing gives a minimalist, distraction-free in-buffer completion with a capable fallback list, using a handful of settings and no third-party packages. Configuration snippets are on his website.

The minimalist path: completion preview

completion-preview-mode expands what you have typed inline. Typing def surfaces a suggestion; you keep typing to narrow it, and once a unique match highlights, TAB expands it. If a suggestion isn't wanted, you simply carry on typing — pressing space or RET ignores it and moves on.

Cycling through candidates is M-n / M-p, with the echo area reporting position ("suggestion 5 of 87"). Protesilaos points out that rotating through 87 candidates one by one is error-prone and irritating, which is exactly where the second half of the setup comes in.

He also binds M-i to insert the word being completed, which lets him build up compound symbols piecewise — typing use-, inserting package, then modusmodus-themes while rejecting the longer modus-themes-faces.

The escape hatch: the Completions buffer

Pressing TAB brings up the Completions buffer. The Emacs 31 improvement he values most is that it now updates eagerly: continue typing without hitting TAB again and the candidate list recalculates and narrows live. That gives a visual aid plus the ability to pick a candidate by sight rather than guessing its position in a cycle.

Arrow keys and RET select from the buffer as usual.

Why this matters

For programming, Protesilaos finds these prompts genuinely useful and the distraction-free style appealing — in flow, the interaction happens naturally. For prose he wants none of it: no popups, no completions, just immersion in his own thoughts.

His broader point is about the state of core Emacs. A few versions ago you needed external packages to get a good completion experience. With Emacs 31 the out-of-the-box result no longer feels like a compromise or a downgrade — it is already excellent, and packages now make it perfect rather than make it usable.

Credits and pointers

  • completion-preview-mode was introduced in Emacs 30, developed by Eshel Yaron.
  • The newcomer-presets theme, new in Emacs 31 and developed by Philip Kaludercic, configures a set of variables and minor modes sensibly. Protesilaos recommends it as the first line of a new Emacs 31 configuration — good for newcomers and, he argues, for everybody.
  • Emacs 31 was released about a week before this recording.
  • A companion video from a few weeks earlier covers built-in minibuffer completion in more depth, including power-user features.