DEV Community

Kelvin Kariuki
Kelvin Kariuki

Posted on

Developer Take on: Emacs 31 Is Around the Corner – The Changes I'm Daily Driving

Developer Take on: Emacs 31 Is Around the Corner – The Changes I'm Daily Driving

If you're an Emacs user, especially one who spends most of their development life within its buffers, then the upcoming Emacs 31 release is more than just another version bump – it's a significant upgrade promising substantial quality-of-life improvements and performance gains. As someone who has been daily driving Emacs from its master branch for a while now, I've had the pleasure (and occasional pain) of experiencing these changes firsthand. Here’s a developer-centric rundown of what excites me most and how these updates are shaping my workflow.

A Leap in Performance: The Need for Speed

Let's be honest: Emacs has a reputation, sometimes deserved, for not always being the fastest kid on the block, especially when dealing with modern, data-intensive tasks. Emacs 31 takes significant strides to chip away at this perception.

JSON Parsing Goes Blazing Fast

For any modern developer, JSON is ubiquitous. Language Server Protocols (LSP), APIs, configuration files – you name it, JSON is there. Previous Emacs versions could sometimes feel sluggish when parsing large JSON responses or when an LSP client like Eglot was busy communicating with a server.

Emacs 31 introduces native JSON parsing implemented in C, replacing the older, slower Lisp-based parser. This is a game-changer. The difference is immediately noticeable, especially in scenarios involving:

  • LSP Interactions: Syntax highlighting, code completion, diagnostics – all feel snappier.
  • API Clients: If you're using Emacs packages that interact with web APIs, data fetching and display should be significantly faster.
  • Large Configuration Files: Managing things like package-json-mode or other JSON-based tools becomes less of a chore.

This isn't just a minor optimization; it fundamentally improves the responsiveness of many common development tasks.

Further Native Compilation Improvements

While native compilation was introduced in Emacs 28, Emacs 31 refines and expands it. More core Emacs Lisp files are being natively compiled, and the process itself is more robust. What this means for you:

  • Faster Startup: Your Emacs init.el and commonly used packages might load quicker.
  • Smoother Operations: Complex Lisp functions, especially those doing heavy computations or string manipulations, benefit from being compiled to native code.

The project is continuously working on making more of Emacs natively compiled by default, ensuring a snappier experience right out of the box.

User Experience Refinements: Small Changes, Big Impact

It's often the subtle tweaks that make the biggest difference in daily use. Emacs 31 brings several such refinements.

X-style Primary Selection (x-system-primary-selection)

For Linux users accustomed to the "select to copy, middle-click to paste" behavior, this is a long-awaited feature. Emacs 31 finally offers robust support for the X primary selection. Enabling x-system-primary-selection in your configuration means you can highlight text in Emacs and immediately paste it into another application (or vice-versa) using the middle mouse button, without explicitly copying to the clipboard.

This might seem

Top comments (0)