What's new in Emacs 31.1

312 points
1/21/1970
a day ago
by geospeck

Comments


Davidbrcz

TIL about Emacs' antinews (what would be new if you were to downgrade to Emacs 30) https://www.gnu.org/software/emacs/manual/html_node/emacs/An...

6 hours ago

akoster

Quote from the bottom: “To keep up with decreasing computer memory capacity and disk space, many other functions and files have been eliminated in Emacs 30.2.”

Honesty, not such a wild proposition in 2026 with new hardware generations offering the same or less RAM and storage!

2 hours ago

WalterGR

There’s some great stuff in there.

> As part of our continuous struggle to make Emacs simpler, we’ve removed the `margin` face, so text shown in display margins will now use the same `default` face as the rest of buffer text. Our long-term goal is to remove faces completely, thus leaving the Emacs with just two colors, so we gradually remove more and more faces as we go.

3 hours ago

pvaldes

what?, goldenrod face vanished?

3 hours ago

kragen

How unfortunate that glibc has removed support for unexec. Although it wasn't a very widely used feature, it seems like the kind of orthogonal powerful feature that distinguishes one platform from another, like Unix's fork(), or I/O redirection, or strace, or not needing different system calls to write text and binary files. In an alternate universe, you could imagine unexec support being generalized to support broader classes of applications for purposes such as process migration, high-availability failover, and bug reproduction (as with rr), instead of being removed.

5 hours ago

taeric

I always assumed it was a bit of a common practice from image based development practices. I'm now assuming I was incorrect on that being the case?

I'd love to read a good history of the different development styles. I know we often have a good exploration of the parts of an executable file. I don't recall seeing a good exploration of different compilation/build styles through the years.

4 hours ago

Asooka

There was a lot of discussion around the time it was being removed[0], but it seems the glibc people simply didn't want the support burden and Emacs was the single user of that interface. I think the issues could have been resolved by checking if all shared libraries are exactly the same as when unexec was called, that the kernel is the same and that the CPU is the same, and failing if anything doesn't match, thus falling back on slow startup. That said, portably serialising the state and loading it back is a better solution IMO.

[0] https://lwn.net/Articles/673724/

36 minutes ago

markstos

I went from `vi` to `vim` to `neovim` to a spiritual successor `helix`, and here's Emacs at release 31 still the dominant fork of the emacs family of editors. Impressive.

an hour ago

whimblepop

GNU Emacs isn't the first Emacs, although it's still an impressively long-lived and vivacious one.

an hour ago

kstrauser

Between treesitter and eglot (read: LSP), there’s not much from other editors I miss when using Emacs. I’ve been on a Zed kick for a while but I hear the call of the GNU. This may be the week I declare .emacs bankruptcy and start again with a clean setup, seeing how much of my old third-party config I can replace with builtins.

a day ago

mickeyp

AI is very good at Emacs Lisp - esp GPT. So you'll have an easier time around today!

11 hours ago

kstrauser

It really is! For anyone who’d wanted to try Emacs but found it overwhelming, AI is game changing.

BTW, I’ve been using Emacs for like 30 years. I’m comfy with it. The bankruptcy is more about throwing out an old config that’s gotten big and crufty and restarting doing things the new way. For example, trying all the new completion stuff instead of corfu/vertico/etc., which are supremely nice but perhaps no longer essential. Similarly, a few years ago I went from lsp-mode to eglot, because it’s built in and a nice baseline.

4 hours ago

zelphirkalt

I also tried lsp-mode first but then thought "Let's see what the built-in has to offer, if that's simpler." and am sticking with eglot since then. It does enough for me, and the configuration is manageable.

36 minutes ago

kstrauser

Same. lsp-mode's quite nice, to be sure, but eglot's also excellent and it's been completely sufficient for my needs.

24 minutes ago

thom

Yeah, I've always had the problem in Emacs that I know some quality of life feature would be possible to implement, but it'd take me hours or days so I just end up going back to work. With gptel, I've been able to really take control of my environment. And what's great is the LLM can write better LLM-integration functions too so you really end up with the perfect harness for whatever you're doing.

7 hours ago

wmedrano

Are there any Zed features you're going to miss? Is the AI notable?

14 hours ago

iLemming

> Is the AI notable?

Working with LLMs in Emacs is pure joy. LLMs are all about text and Emacs is the absolute king here. Nothing, even remotely comes close. Emacs is not a text editor - it's a text orchestrator, you can control any text-relevant aspect in its computational vicinity - anything you see on your screen, local and remote computers.

Anything else might feel great for coding, but what do you when you need etymology or definition lookup, thesaurus exploration or translation in the middle of typing a comment? Well, you might say: "I'd bring the browser", but that's the equivalent of keeping your cup in the kitchen and whenever you need a sip of coffee, having to walk over there and back to your home office.

I can start conversing with a model virtually anytime, anywhere in Emacs. I can ask it to find me a command while I'm browsing the M-x menu, can you do that in Zed's command palette?

I can send a query asking for... I dunno, to fact check a sentence in the middle of typing it. While working with a model in ECA (Editor Coding Assistant) on some codebase, I can ask gptel (unrelated package) to correct my own prompt, using a different model, with dissimilar parameters. Or ask it to find me a way to summarize my current investigation, or combine multiple chats into a single pdf document, etc. The only limitation is your own imagination.

2 hours ago

kstrauser

Not really, no. Zed’s a fine editor and I have nothing but good to say about it. I just happen to prefer Emacs more. Its keystrokes are burned into my muscle memory. And because its config files are literally executable code, there’s nothing too crazy for Emacs. Can it do XYZ? Absolutely, if you tell it to!

As to AI: Emacs continues to have zero built in. If you like it, though, it supports any agent you might want to use. I was highly amused the first time I wanted to use my own company’s agent and found it was already well-supported by a popular package.

And honestly, Emacs + a coding agent = magic for anyone who wanted to use it but was intimidated by Elisp. “Hey Droid, tell Emacs to swap the command and option keys on my Mac.” “Ok, done!” It’s a ludicrously powerful combo.

13 hours ago

iLemming

> Emacs continues to have zero built in

Emacs has 35+ different AI tools.

https://www.reddit.com/r/emacs/comments/1uwm3c0/the_state_of...

Not being built-in into the core, means nothing. Emacs just doesn't operate that way.

2 hours ago

kstrauser

That's correct. But most of the time when I see that question lately, it's because people want to be sure the editor doesn't have "built-in AI", whatever that might happen to mean. For example, I've seen lots of comments like "I like Zed but wish there was a version with no AI support in it whatsoever". I don't share that opinion. It's one I've seen many times.

I don't think that Emacs ships with any AI agent support today, and that makes some people happy, so I mentioned it. Note that I also mentioned that there are packages that do add that support, and I happily use them.

2 hours ago

ubercore

I went full circle on AI. For an in-editor experience, Zed is top notch. But I've found I actually prefer just to go back to claude code + Zed.

9 hours ago

iLemming

Personal opinions. How is it "top-notch", what does that even mean in practice?

I can tell you why working in Emacs feels empowering - when I'm working with an LLM, my Jira tickets are "transparent" - Emacs knows that any pattern that looks like 'XYZ-124354' is a Jira ticket - I can check the status, description, and other things on the fly. I don't need to switch to any other tool, need no browsing of the ticket. I can quickly convert it to a markdown link with a description (if I need to talk to my colleague about it). Same thing about 'foo/bar#42' pattern - Emacs recognizes it as bug-reference token - it's an issue or a PR - I can immediately retrieve any info about it in the middle of typing.

I can collapse any large parts of my investigation without affecting my context and I can peek into them without expanding if I don't have to. I can change my freshly typed prompt using a different model, with different parameters, asking it I don't know, fact-check my assumptions or fill the gaps - all that while I'm typing it in my coding AI assistant buffer.

I can search for and pick a Slack thread interactively, without having to even switch to Slack, and tell the LLM to look into it, or simply extract some text or a snippet to paste it verbatim, or with modifications.

I can interactively pick a tab in my browser and insert its url, or grab a text from it. Without ever switching to the browser - it could be even not visible on my screen. I similarly can grab anything from my browser history.

Emacs remains the absolute king for text manipulation of all kinds and text in the age of LLMs is simply everything. Nothing can beat Emacs when it comes to text, and oh boy have I tried so many other things.

an hour ago

LeBit

And if the correct keystrokes are burned into your muscle memory, you can opt for Evil mode.

5 hours ago

froh

I infer you don't use magic?

8 hours ago

kstrauser

Why would you infer that? Magit’s great!

4 hours ago

imglorp

You mean magit?

7 hours ago

alfiedotwtf

After realising you can modify the transient menus pretty easily, magit has been even more wonderful now

5 hours ago

aquariusDue

Wait, what? Do tell more, please!

37 minutes ago

rtpg

Bit of a tangent but does anyone have good learning materials on doing things with Emacs Lisp beyond just staring at the source of packages?

I have the Mastering Emacs book and read through most of it, which gives me a good idea for some stuff... but I really would like to have good ideas for the right kind of design patterns for common things.

18 hours ago

rwl

You don't have to just "stare" at the source; you can interact with it! Emacs is incredibly well documented and you can learn a ton with just C-h f (i.e. M-x describe-function) and C-h v (i.e. M-x describe-variable). In an Elisp source file, use those commands whenever you don't know exactly what a function or variable does. Read the description, and click on the hyperlinks to see the source. This is IMHO the best way to learn how to actually get things done. If you don't know what function or variable you're looking for, M-x apropos and its variants will be helpful.

I don't have a good reference (other than the Elisp manual) for high-level design patterns, but in general, Elisp is very flexible and already has what you'd need to implement any patterns you know from elsewhere. Decide on your data structures first. Probably the most important lesson you might not know yet is to use buffers, not strings, to do most text manipulation.

7 hours ago

iLemming

> does anyone have good learning materials on doing things with Emacs Lisp

Pick a quality model, even good local ones are fine, you don't need to feed greedy capitalistic machine. Talk to it. Your first step would be to find a way for the model to "peak into" and change actively running Emacs instance - that's typically done through emacsclient.

Next step - choose a harness package - ECA, gptel, agent-shell, etc., with the goal of running the AI from inside Emacs. You can use external tools - pi, claude, copilot-cli, etc. to get there.

And then just ask questions. With utmost curiosity. Like: "What is lexical binding", "why did you write it this way", "how pattern matching is done in Elisp", "how do I make this type of window to always appear on the right", etc.

Best way of learning is by building something practical. In your case, you'd be building your own Emacs. Just the way you imagine it. And that's virtually the only limitation to it - your own imagination.

41 minutes ago

rootnod3

All of Prot's packages[1] are really nicely designed imho.

[1]: https://protesilaos.com/emacs/

13 hours ago

sph

He’s also got a Youtube channel if you prefer to learn that way.

12 hours ago

rootnod3

And coachings!

11 hours ago

MarsIronPI

Have you read through the Emacs Lisp Intro and Elisp manuals in Info? The latter is especially helpful as a reference.

17 hours ago

wmedrano

I started getting a little more into ELisp after reading The Land of Lisp, though its probably a bit basic. If I were to try to get better at ELisp through reading books/docs, I'd look into Common Lisp material.

17 hours ago

uutangohotel

> As always, my book, Mastering Emacs is 31% off for the next week to celebrate the release also.

Eventually, Mastering Emacs will be free!

28 minutes ago

SoftTalker

my .emacs and associated configs have accumulated decades of pretty poorly organized customizations, a lot of it related to things I used with ancient projects that I haven't touched since. Probably time to do a reset back to current defaults and reapply the stuff I actually use.

an hour ago

qazxcvbnm

I’ve heard that the graphical browser is back on emacs! Xwidgetwebkit was dead since emacs 29, and for a while I was left pining for a good graphical browser in emacs.

Since then, friendly AI emacsers stuffed usable versions of graphical browsers into emacs, but those never felt truly emacs-native and did leave quite a bit to be desired (embr, the least unusable of the pack, being referred to here; among its warts - unreliable link detection; forcing “tabs” within a buffer; non deterministic unresponsiveness; causing C-g to lag).

Finally I can rid myself of such impurities from core emacs!

6 hours ago

kkylin

Unfortunately the NS/macOS version still needs work as far as I can tell. Even not fully featured it's still useful: I prefer reading PDF in xwidget-webkit than pdf-tools, and it's great to have Jupyter notebooks running inside a browser inside Emacs.

an hour ago

bpye

Is there a better way to get started with Emacs than the built in tutorial? I've tried a couple times (due to increasing annoyance with VS Code), but have struggled to get to a point where I feel productive enough.

11 hours ago

mickeyp

I recommend the tutorial (Help -> Tutorial) from the menu bar inside Emacs to get you started. Don't listen to people telling you to disable this or that. Use your mouse and arrow keys to get started. Don't worry about what other people are doing with their Emacs too much. Pick one thing you want to do with Emacs and focus purely on that (writing Go, taking notes in Org, etc.) and avoid a wholesale move unless you have infinite time and patience.

See also my reading guide: https://www.masteringemacs.org/reading-guide

My book is of course an option also, but it costs money.

11 hours ago

alfiedotwtf

Your book should be mandatory. It’s a gem and I think I’d still be on Vim or VSCode without it!

5 hours ago

mickeyp

Thank you so much for the kind words :) I'm glad I could help you switch!

4 hours ago

kstrauser

So, uh, v31 update coming soon? crossing-fingers.gif

4 hours ago

mickeyp

Yeah I'll be working on it. Been busy on another product (see bio) which has taken up a year-plus of my time. Hence the lack of regular postings!

3 hours ago

code-blooded

Wonderful. I'll be among buyers the day it releases

an hour ago

mickeyp

I'll happily hook you up with a key for you to play around with - feel free to drop me an e-mail.

2 minutes ago

kstrauser

Lovely! I’ll check it out.

2 hours ago

mickeyp

Happy to supply you with a beta key; give me a ping via email.

2 minutes ago

sinker

It's no different from learning vim. Just stick with it until the shortcuts become cognitively automatic.

It also helps to learn upfront the idiosyncratic terms and concepts like buffers, windows, frames, yanking, killing, etc.

Most of these terms map one-to-one to more familiar nomenclature like copy, paste, etc.

Buffers is a concept a bit more unique and integral to emacs. It's easier to understand in practice than in reading.

Most importantly though, emacs is a lisp machine, and exposes the highest level of granularity, and enables the finest level of customization for the user.

an hour ago

jmmv

Start with Doom Emacs. I haven't felt the need to customize almost anything since I switched (from VSCode) 4 years ago.

TBH, I had used Emacs before VSCode and had accumulated a bunch of cruft in my .emacs configuration, and I never felt it was "mine" anyway...

8 hours ago

roundcan7998

Mastering Emacs: worth every cent. (ignore what author says about it costing money) It is what got Emacs to “stick” for me.

Just get it already

9 hours ago

throwa356262

Can you expand this a little bit? What makes this book different?

6 hours ago

roundcan7998

It speaks to people like you and me.

Folks in the modern age, who want to get up to speed with an old trusty tool, without the biases of other folk getting in the way.

You get up to speed enough, that you can then go find your own way.

Mickey’s writing is conversational yet pithy and laconic. (in a very good way)

4 hours ago

stackghost

I'm in the minority and think the tutorial is awful. "Here's this software everyone says is so great. Before you can actually use it, be sure to spend 20 minutes doing a bunch of stuff for which you don't have context/don't have motivation for"

No thanks.

Instead, literally just start using it and ask an LLM for help as you go.

an hour ago

flowerlad

I wish they would make Arm64 Windows binaries a standard part of the release. Intel is on its way out.

2 hours ago

wmedrano

I'm excited for the user-lisp/ changes. It'll let me create custom lightweight packages and have them lazily loaded by just sprinkling ;;;###autoload over interactive commands and modes.

21 hours ago

diegoeche

I love emacs. I used emacs for 20 years. But I haven't used it as much since moving to codex/claude. Even with vterm, can't really use TUIs that well inside IMO. Or at least, had way too many issues where emacs/vterm was the culprit

3 hours ago

sinker

Emacs is incredibly powerful with ai agents. Because everything is a function, and emacs is introspectable down to its atoms - agents can write, review, execute, and evaluate the results in a closed loop. The evaluation part is usually what's missing from most agent-driven workflows. Either you (the person) needs to do a live evaluation or the ai agent derives a primitive evaluation using what's available (eg, screenshots, looking at html/css output to form a visual representation).

In emacs, everything is available, everything is a primitive function, everything can be inspected, the documentation (ie, contextual food for agents) is built-in, and emacs itself can be piloted entirely through function calls. This means that agents can fully control an emacs instance and run that closed loop (write, test, evaluate, repeat) with almost complete information - which makes the [given prompt] : [results conforming to spec] relationship much tighter than in most environments.

an hour ago

greggroth

You should give https://github.com/xenodium/agent-shell and https://github.com/dakra/ghostel a shot. With ghostel I genuinely mix up which window (frame) is emacs rather than the native Ghostty window.

3 hours ago

bfors

awesome, I was looking for a libghostty emacs terminal about a month ago. vterm just does not cut it for me.

3 hours ago

prometheus76

The part the author shared about the huge overhead cost of firing up emacs, especially in a multi-user environment (I learned about emacs vs vi holy war back on a multi-user Solaris environment), our Unix professor strongly encouraged us to learn vi. He said "vi is part of every standard Unix install, so when you ssh into a box, you'll always have your editor and it won't steal all the CPU from the other users when you fire it up."

Feels monumental to see that come to an end decades later.

5 hours ago

jasperry

That's funny, because our professor didn't tell us that and I remember doing my projects with four terminal windows logged into the server and three of them running separate instances of emacs :D. I wonder how much I bogged down that mid-90s HP-UX machine.

5 hours ago

CodeCompost

The section under "User Lisp Directory" seems incomplete. I was expecting a second paragraph.

12 hours ago

brabel

I thought the same, but later on in the article they go into more details and explain that lisp files under that directory will be auto loaded and commands they add should just work! Really good stuff.

11 hours ago

systems

for me the highlight of this release is the docked speedbar, it took them too long, but its finally here

dired mode is fine, and i appreciate it, but having the folder view docked on the left, was something i missed in emacs, happy its finally here

3 hours ago

thataccount

It is clear that this article simply does not know the power of Vi/VIM!

5 hours ago

whimblepop

In fact, the author of this blog post is also the author of a book on Emacs, which includes a section about Vi(m) bindings and migrating from Vim: https://www.masteringemacs.org/article/switching-from-vim-to...

And Emacs is strictly more powerful than Vim. :)

(I mean that seriously, actually— I don't think people who have used both but prefer Vim would generally list "more powerful" among their reasons for preferring Vim. It's usually more about not liking Lisp, some kind of "minimalism", or a different sensibility about composability.)

an hour ago

thataccount

I always liked the command structure of Vim better.

36 minutes ago

shevy-java

This operating system just got better!

4 hours ago

Quitschquat

Anyone know if Zaretskii resigned over the portable dumper?

14 hours ago

jake_and_fatman

We should be so lucky. No, sadly, bruv has repeatedly enticed handing over the keys over a silly dustup like the portable dumper, the long line mishandling, or the c-ts-mode incident where he could not bring himself to admit wrongdoing, then invariably back out hoping no one will remember his tantrum. This emacs thing is really all he has.

an hour ago

vocx2tx

He's in the MAINTAINERS file[0], and the person with the most commits in 2016-2026 period, so no.

[0] https://github.com/emacs-mirror/emacs/blob/master/admin/MAIN...

12 hours ago

bitwize

The pdumper has been around for yonks, and afaik Zaretskii is still maintaining.

10 hours ago

pkal

I was annoyed by some of the comments in the "Packages" section, because it is clear that the author didn't try anything out but just scattered a few comments though out the file.

Regarding :vc and :load-path, this was obsoleted transitively due to the obsoleting of package-vc-install-from-checkout, which has portability issues. Bug#80604 goes into the background for this. This is NOT an obsoletion of the :vc keyword for use-package.

Regarding package-autosuggest, this is disabled because it doesn't interest most users. It is targeted at new users who aren't familiar with the packages, and might be interested in new major modes. Experienced users are generally either familiar with the packages and use them or prefer to stay in fundamental mode. The minor mode is enabled as part of the newcomers theme!

No mention of package-review-policy, which especially in the "age of AI" is an important feature is you want to be careful about external code you are using on your system.

Oh and on the topic of the newercomers theme, the reason it is not mentioned "higher up" in the NEWS file, besides it being the wrong section, is that it is highlighted on the splash screen, where new users are going to find it, instead of a NEWS file.

a day ago

brabel

The post mentioned so many things and went into lots of interesting discussions about the new stuff . I find it amusing you think it’s ok to criticize the author for not trying things out and not mentioning your favorite topics. Here’s an idea: write a better post yourself.

11 hours ago

mickeyp

But I do test things out, by virtue of often running the tip of master branch and submitting bug reports. But I cannot test every mention in the NEWS, so on that part you are right.

Deprecating :vc + :load-path without expressing why is a curious oversight. And "portability issues" is all fine and good, but why embed custom git clone + build grammar code in the treesit.el file if VC checkout portability is a concern? Surely VC is better at it than a bunch of brittle string concat code in treesit.el I do not understand why one part works and another supposedly does not.

The change is especially infuriating as for most of us it actually worked fine, and user-lisp directory does not solve the retrieval and setup problem, which `use-package` for all its flaws at least standardises.

Most users probably do care about discoverability of related packages, existing user or not. But that's in the eye of the beholder.

`package-review-policy` is security kabuki theatre. Someone who wants to harm an Emacs user can find many other ways of doing so with or without this flag.

12 hours ago

jmclnx

I do not know what temacs is, but on Slackware 15 w/emacs-30.2, temacs does not exist. I wonder if temacs is something used in other operating systems ?

I hope to upgrade to 31.1 on Slackware either today or tomorrow. I will grab the source from Slackware current and compile/install :)

5 hours ago

bos

temacs, in older versions of Emacs, is an intermediate build product, never something that is installed. It’s created fairly late during the build, then loaded up with the standard library, undumped, and that is the emacs that is installed.

5 hours ago

mickeyp

You typically won't see it installed at all because it's considered an intermediate artefact. You'll have to compile Emacs yourself from source to get it.

4 hours ago

jmclnx

Well for what it is worth, I build Emacs 31.1 on Slackware 15.0 and it has an odd issue. I get this message below but issuing that command does not fix it, the warning still appears. So either I need to move from ccrypt to a different encryption utility or revert. For now I will revert and decide if I want to use gnupg instead. I use ccrypt for my password list text file.

    for more information.
    *  Warning (files): Missing ‘lexical-binding’ cookie in 
       "/usr/share/emacs/site-lisp/ps-ccrypt.el".
    You can add one with ‘M-x elisp-enable-lexical-binding RET’.
    See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
    for more information.
I used the "regular" slackbuild. native-compilation slackbuild fails with a missing library.

But Emacs 31.1 is in Slackware Current, so when Slackware is released I will be on it :)

3 hours ago

bygosh

you should report that bug to ccrypt, emacs is getting a lot more strict about lexical binding support (for good reason). it just needs ;; -- lexical-binding: t/nil -- at the top of the file.

2 hours ago

cod3ninja

Nice, Emacs is so old school!

6 hours ago

hirvi74

I hope my Treesitter issue has been fixed with macOS. I gave up on the problem about this time last year.

By installing the grammars on the user's behalf, I think I might be in luck!

I don't remember the exact issue, but I remember having to dig through the release histories of each of the poorly documented ABI version for each language to find whichever versions was compatible.

I've got my fingers crossed.

13 hours ago

mickeyp

My Combobulate page has suggested package versions but note I have not yet confirmed 100% compatibility with every single Emacs 31.1 major mode yet, though all tests for Combobulate do pass in 31

github.com/mickeynp/combobulate

11 hours ago

fergie

Have also struggled with this- would be great to see a fix

10 hours ago

yanhangyhy

i just gived it a try. works like a charm, treesitter + lsp. i asked cursor to help me with the config.

8 hours ago

hirvi74

Omg, I can finally return to my beloved for all the languages I use. Thank you for the update.

2 hours ago

yewenjie

Now would be the time for someone to use AI to rewrite the Emacs core to make it faster.

6 hours ago