← Back to news

Emacs 31 is around the corner: The changes I'm daily driving

rahuljuliato.com|306 points|158 comments|by frou_dh|Jun 18, 2026

Emacs 31 is on the Horizon: Features I'm Already Using

Rahul M. Juliato

Inspired by Karthik Chikmagalur's series on the "batteries included" nature of Emacs, I've been spending my time with the upcoming Emacs 31. While the official release is still pending, I have been daily driving builds from the master and emacs-31 branches for several months.

As I discover useful additions, I integrate them into Emacs Solo—my personal configuration that eschews external packages. I tag these additions with a ; EMACS-31 comment to ensure I can audit them once the version is finalized.

Disclaimer: Because Emacs 31 is currently in its pre-release phase, please be aware that default settings and function names are subject to change before the final launch.

If you aren't currently compiling from the development branches, consider this a sneak peek.


Tree-sitter: From Manual Labor to "Just Works"

The most impactful upgrade for me is the streamlined Tree-sitter integration. Previously, setting up a *-ts-mode was a tedious process of manual configuration and hoping your system's compiler was correctly configured.

The Evolution of Setup

FeatureThe "Old" Way (Pre-31)The Emacs 31 Way
Grammar InstallationManual treesit-install-language-grammarAutomatic prompts via treesit-auto-install-grammar
Mode SelectionManual activation of -ts-modeGlobal toggle via treesit-enabled-modes
Source MappingManually defining treesit-language-source-alistBuilt-in sources for common languages

To enable this seamless experience, I now use:

(treesit-auto-install-grammar t) ; EMACS-31
(treesit-enabled-modes t)        ; EMACS-31

This effectively brings the functionality of the treesit-auto package directly into the Emacs core. I no longer need to manually map sources for languages like Rust, TypeScript, TSX, YAML, TOML, or Dockerfile. In fact, my config is now full of add-to-list 'treesit-language-source-alist ... lines that I can't wait to delete.

A Warning on Architecture

There is one significant "foot-gun" for those who sync their .emacs.d across different hardware (e.g., an Intel Mac and an M-series Mac). The auto-installed grammars are not stored by architecture.

Mathematically, if you have two machines with architectures ArchA\text{Arch}_A and ArchB\text{Arch}_B: Binary(ArchA)Binary(ArchB)\text{Binary}(\text{Arch}_A) \neq \text{Binary}(\text{Arch}_B) Since they share the same filename, a binary compiled on one will fail to load on the other.

Kudos to Yuan Fu and the rest of the development team for their relentless work on improving the performance and usability of Tree-sitter.


The New markdown-ts-mode (Experimental)

Emacs 31 introduces a built-in markdown-ts-mode. This project is particularly special to me because it started as a proposal I submitted to emacs-devel in early 2025.

While I provided the initial spark and code, this became a collaborative triumph. Stéphane Marks joined the effort and provided the immense energy and attention to detail required to move the mode from "functional" to "polished."

The Development Journey

To try it out, you can use:

(use-package markdown-ts-mode 
  :ensure nil 
  :defer t)

Why it's a Game Changer

This mode is more than just a syntax highlighter; it's a full editing environment.

  • Org-like Ergonomics: If you are an Org-mode power user, you'll feel right at home. It supports similar structural navigation, heading movement, and section folding.
  • Dynamic Code Blocks: Fenced code blocks are fontified using the actual major mode of the language.
    • Example: An ```elisp block uses real Emacs Lisp highlighting.
  • Integrated Editing: You can use the target language's editing commands inside the block.
  • Visual Documentation: Image links are rendered directly in the buffer, transforming a wall of ![](path) text into a readable document.

The "Rough Spot": Completion inside code blocks is still a bit "twisty" and prone to bugs. This is the current frontier of the development.

How to Use it Now

Because it is still experimental, it isn't yet tied to auto-mode-alist. You have two options:

  1. Manually load it: M-x load-library \rightarrow markdown-ts-mode.
  2. Bravely add it to your own auto-mode-alist.

Stéphane and I are aiming for a stable release by the next version. If you encounter issues, please report them via M-x report-emacs-bug.

Rahul M. Juliato