# Emacs 31.1 automates tree-sitter grammars and retires unexec

URL: https://techaiwire.com/articles/emacs-31-1-tree-sitter-grammars-unexec/

_By Claire Whitmore - Aug 24, 2026_

GNU Emacs 31.1 was released on 24 August 2026, and the change most likely to
alter a working day is small: tree-sitter grammars can now install themselves.
The release announcement, posted to the info-gnu-emacs mailing list by Sean
Whitton, points to `etc/NEWS` for the details rather than listing them, so the
shape of the release comes from the rundowns published alongside it - a
rewritten completion system, a set of window-layout commands, and the removal
of the unexec dumper that has been deprecated since Emacs 27.

## Tree-sitter grammars stop being a manual chore

Emacs 31.1 adds a `treesit-auto-install-grammar` option that installs
tree-sitter grammars automatically, according to Mastering Emacs's rundown of
the release. Until now, using a tree-sitter major mode meant sourcing the
grammar yourself and keeping its version aligned with what the mode expected -
a mismatch produced errors that looked like editor bugs rather than a
dependency problem. Mastering Emacs describes the new option as eliminating
that manual version management.

Tree-sitter navigation also gets more complete. The same rundown lists
`treesit-forward-sexp-list` and `treesit-forward-list` for movement across
structural nodes, plus a `treesit-explore` command for inspecting the parse
tree - the practical way to work out why a mode is highlighting or indenting
something unexpectedly.

## The completion system was rewritten

The Completions buffer can now appear eagerly rather than waiting to be asked
for, and the flex matching algorithm has been rewritten, per both Mastering
Emacs and Linux Compatible's coverage of the release candidate. Completion
categories can inherit from one another, and `RET` now selects the candidate
chosen with `M-UP` or `M-DOWN`.

Linux Compatible also documents `minibuffer-visible-completions` gaining an
`up-down` value: "You can also use `minibuffer-visible-completions` with a new
'up-down' value to navigate completions independently of the minibuffer." For
anyone who has assembled this behaviour out of third-party packages, the
question worth asking after upgrading is which of those packages are now
redundant.

## Window layouts get first-class commands

Rearranging a window layout has meant deleting and re-splitting windows by
hand. Emacs 31.1 adds commands that operate on the layout as a whole, listed
by Mastering Emacs:

| Command | What it does |
|---|---|
| `window-layout-rotate-clockwise` | Rotates the layout clockwise |
| `window-layout-counterclockwise` | Rotates it the other way |
| `window-layout-flip-topdown` | Flips the layout vertically |
| `window-layout-flip-leftright` | Flips it horizontally |
| `window-layout-transpose` | Transposes rows and columns |
| `other-window-backward` (`C-x O`) | Moves to the previous window |

`split-window` can also resurrect a window that was deleted, per the same
source. Two terminal-facing changes land alongside these: `xterm-mouse-mode`
is enabled by default in terminals that support it, and child frames now work
on TTY frames.

## What was removed, and one fix that did not land

The unexec dumper is gone. It had been deprecated since Emacs 27, and Mastering
Emacs marks its removal as "the end of an era" - relevant mainly to anyone
building Emacs themselves or maintaining packaging for it. The built-in `ctags`
program was also removed, with Universal Ctags the expected replacement.

Two items did not make this release. The garbage collector work has been
postponed to Emacs 32, according to Mastering Emacs. And Linux Compatible
reports that a vulnerability in Emacs Lisp symbol shorthands has a mitigation
in this release line but that the full resolution is deferred to version 32 -
worth knowing if you open Elisp files from sources you do not control.

Unicode support moves to version 17.0, with new input methods for polytonic
Greek, Tifinagh, Northern Iroquoian languages including Mohawk and Oneida,
Burmese variants, and Syriac.

## What this means for developers

The tree-sitter change is the one to act on first. If your config carries
hand-rolled grammar-installation code or a pinned grammar commit, try
`treesit-auto-install-grammar` on a scratch config before deleting anything -
then remove whatever it makes redundant. The same applies to completion: the
eager Completions buffer and the rewritten flex matcher overlap with what
several popular packages exist to provide, and running 31.1 with a
deliberately minimal config for an afternoon is the fastest way to find out
what you no longer need to carry.

If you build Emacs from source or maintain a package for a distribution, read
the unexec removal as a build-system change and check your recipe before
upgrading users. The `ctags` removal deserves the same treatment: anything
shelling out to the bundled binary needs Universal Ctags installed instead.

Two things argue for patience rather than haste. The announcement itself
delegates the detail to `etc/NEWS`, so `C-h n` inside a freshly built 31.1 is
the authoritative list - not any summary, including this one. And the symbol
shorthand fix landing only in Emacs 32 means the security story here is
incomplete; if you routinely open untrusted Elisp, that is a reason to keep
watching rather than to consider the matter closed.

## Sources

- [Emacs 31.1 released](https://lists.gnu.org/archive/html/info-gnu-emacs/2026-08/msg00004.html) - GNU info-gnu-emacs mailing list
- [What's New in Emacs 31.1?](https://www.masteringemacs.org/article/whats-new-in-emacs-311) - Mastering Emacs
- [GNU Emacs 31.1 RC1: Completion Overhaul, Window Commands and Unicode 17.0](https://www.linuxcompatible.org/story/gnu-emacs-311-rc1-completion-overhaul-window-commands-and-unicode-170) - Linux Compatible
