Emacs 31 Is Around the Corner: The Changes I'm Daily Driving

frou_dh2 pts0 comments

Emacs 31 Is Around the Corner: The Changes I'm Already Daily Driving | Rahul's BlogRahul's Blog

light dark

Emacs 31 Is Around the Corner: The Changes I'm Already Daily Driving<br>Rahul M. Juliato

Rahul M. Juliato

June 18, 2026<br>#emacs#emacs-31# config

Karthik Chikmagalur recently published another of his excellent<br>"Even More Batteries Included with Emacs"<br>posts, digging into lesser-known features that already ship with Emacs<br>today. I wanted to write its mirror image. His post covers the<br>batteries already in the box. Mine covers the ones arriving in Emacs<br>31.

Emacs 31 isn't out yet, but I've been building it from both emacs-31<br>branch and master and daily driving it for months. Every time<br>something new and useful lands, I fold it into Emacs<br>Solo, my no-external-packages<br>config, and mark it with a small ; EMACS-31 comment so I remember to<br>revisit it once the release is official.

This post walks those breadcrumbs. Every change below is one I'm<br>touching in my config right now, with a note on what it does and why I<br>keep it. None of it requires a package. It's all either on master<br>already or close behind.

One disclaimer: Emacs 31 is still in development (actually in<br>pre-release phase), so names and defaults can shift before final<br>release. Everything below is what I'm running as of mid-2026. If<br>you're not building from emacs-31 branch or master, treat this as<br>a preview of what's coming.

Tree-sitter that just works

If I had to pick the single change I'm happiest about, it's this one.<br>For years, getting a *-ts-mode going meant manually populating<br>treesit-language-source-alist, calling<br>treesit-install-language-grammar, and praying your toolchain was set<br>up to compile the grammar. In Emacs 31 a lot of that ceremony goes<br>away:

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

treesit-enabled-modes set to t switches the major modes that have<br>a tree-sitter variant over to it, and treesit-auto-install-grammar<br>makes Emacs offer to fetch and build the grammar when it's missing<br>instead of erroring out. This is the treesit-auto package experience,<br>except now the core does the work.

The knock-on effect shows up all over my config. I used to keep lines<br>like these around to teach Emacs where each grammar lives:

(add-to-list 'treesit-language-source-alist<br>'(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))

In Emacs 31 the grammar sources for languages like TypeScript, TSX,<br>Rust, TOML, YAML and Dockerfile live inside the modes themselves, so<br>I've got a trail of ;; EMACS-31 this is now defined on mode code<br>comments marking every block I get to delete once 31 ships. I'll take<br>less config that does the same job any day.

There are many more tree-sitter improvements coming to Emacs. The<br>developers have been working tirelessly on it, Yuan Fu, along with<br>many others, have been continuously improving the tree-sitter<br>experience across multiple areas. From better language support to<br>usability and performance enhancements, tree-sitter in Emacs continues<br>to evolve at a remarkable pace.

A built-in markdown-ts-mode (experimental)

Emacs 31 ships a markdown-ts-mode in the box, and this one is close<br>to my heart. I started it. It grew out of a proposal I sent to<br>emacs-devel<br>back in early 2025, where the idea and the first version of the code<br>were mine.

I'd be doing the mode a disservice if I let you think it's a solo<br>effort. Stéphane Marks came along a bit later, rolled up his<br>sleeves, and has since become a co-author of the mode. He's the energy<br>behind much of what makes it nice to use today. He didn't send a patch<br>or two and move on; he stayed, pushing the mode well past what I'd<br>sketched out and sweating the details that turn "it works" into "it's a<br>pleasure." Much of the polish I'm about to brag about is his. The mode<br>is ours now, and it's better for it.

Watching an idea make the round trip from a mailing-list message to<br>core code, and picking up a great collaborator on the way, is one of<br>the most rewarding things about hanging around the Emacs community.

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

It gives you more than colors, and these are the parts I want to show<br>off:

✔️ Org users will feel at home. The keybindings and editing feel<br>stay close to Org: navigating headings, folding sections, moving<br>between structural elements. If your fingers know Org, you won't have<br>to relearn Markdown.

✔️ Live, colored code blocks, even for non-tree-sitter languages.<br>This is my favorite trick. A fenced code block gets fontified using<br>the real major mode for that language, not dumped as flat<br>monospace. It reaches Emacs' own internal modes too, so an<br>```elisp block lights up with true Emacs Lisp<br>font-locking, and the other built-in modes do the same. You get<br>proper syntax highlighting inside your code samples with no extra<br>setup.

✔️ Inline image viewing. Image links render in the buffer, so a<br>Markdown doc with screenshots or diagrams reads like a document,...

emacs mode tree sitter treesit grammar

Related Articles