Emacs 31 has not yet been released, nor is a date known. Nevertheless, you can build it locally today, test it and if you find issues report these as EmacsBugs.
This page aims to motivate testing Emacs, by highlighting the upcoming features, instead of having a low-effort blog post circulate around the internet. As such, please contribute comments (see HowToEdit if you are not familiar with Emacs Wiki). Just remember: Add context, motivate and attribute!
Consult the NEWS file on the “master” branch for an authoritative and exhaustive listing of changes: https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=master.
-----
The following is a list of highlights from the upcoming Emacs 31 release.
== XtermMouseMode enabled by default ==
This interests anyone using Emacs in TUI mode with a compatible terminal emulator. When enabled Emacs interprets mouse clicks in your terminal window: you can click on buttons just like in graphical sessions, resize windows using the mouse and use the tool bar. While the minor mode has been part of Emacs since 1994, you had to know to enable it.
See https://www.gnu.org/software/emacs/manual/html_node/emacs/Text_002dOnly-Mouse.html for details on the minor mode, and both https://yhetil.org/emacs-devel/87o71p2o0a.fsf@posteo.net/ as well as https://yhetil.org/emacs-devel/87wmg49dtr.fsf@gmx.de/ for further background on the discussion as when to enable to mode by default.
== New commands to rotate and flip window layouts ==
You can rotate all vertical and horizontal splits using the C-x w t command, rotate all windows using C-x w r followed by a left (clockwise) or right (counter-clockwise) key and flip the layout using C-x w f followed by any arrow key.
Contributed by EshelYaron, see https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00322.html.
== More TreeSitter support ==
New user options might interest TreeSitter users:
* `treesit-enabled-modes' can specify for what languages to use the TreeSitter major modes. Optionally you can also enable TreeSitter whenever available (contributed by JuriLinkov)
* `treesit-auto-install-grammar' allows Emacs to download, build and install TreeSitter grammars on demand (contributed by JuriLinkov)
* `define-treesit-generic-mode' is a new macro that simplifies the definition of new TreeSitter based major modes, for instance here is the entire GitAttributes major mode:
{{{
(define-treesit-generic-mode gitattributes-generic-ts-mode
"Tree-sitter generic mode for .gitattributes files."
:lang 'gitattributes
:source '("https://github.com/tree-sitter-grammars/tree-sitter-gitattributes"
:commit "5425944fd61bf2b3bad2c17c2dc9f53172b0f01d"
:copy-queries t)
:auto-mode "gitattributes\\'"
:name "Git-Attributes"
(setq-local comment-start "# ")
(setq-local comment-end ""))
}}}
(contributed by JuriLinkov)
== New VC Commands ==
A number of additions to Emacs' VC system have been added:
* Git Commits can be edited from LogView mode by pressing e, implemented by SeanWhitton,
* New commands to cherry-pick (`vc-revision-cherry-pick', C in LogView) and revert (`vc-revision-revert', R), implemented by SeanWhitton
* New commands under the C-x v w prefix for working with worktrees, also implemented by SeanWhitton.
== Package Reviewing ==
By customizing `package-review-policy', you can inspect packages after downloading them and before they are installed. This is useful for security-minded people but also people who want to see what new features were added or removed by reading the changelog. When updating a package, you can also view a diff or even send an email to the package maintainer with comments.
This feature was implemented by PhilipKaludercic and DanielMendler.
== User Lisp Directory ==
By default, Emacs will byte-compile and auto-load all Lisp files in a "user-lisp" directory within the root of your Emacs configuration at startup. This UserLispDirectory is useful for little personal Lisp files or packages you maintain yourself. It is also possible to manually invoke `user-lisp-prepare' during a session.
This feature was added by PhilipKaludercic.
== Centered lines with line spacing ==
The variable line-spacing can be set to a cons cell to specify the space above and below the line. Before Emacs 31 line-spacing only supported additional space below the line.
This feature was added by AlexanderKaminski und DanielMendler.
== Eager displaying and updating default completion UI ==
The completion UI supports the settings =completion-eager-display= and =completion-eager-update= to show the completion UI immediately and update it on the fly.
Example settings:
{{{
(setq
;; One column view with annotations
completions-format 'one-column
completions-detailed t
completions-group t
;; Sort candidates by history position
completions-sort 'historical
;; Allow navigating from the minibuffer
minibuffer-visible-completions 'up-down
;; Show completions eagerly and update automatically
completion-eager-update t
completion-eager-display t
completion-auto-help 'always
;; Disable noise in the *Completions* buffer
completion-show-help nil)
}}}
This feature was contributed by SpencerBaugh, JuriLinkov and DanielMendler.
== Fast JSON path extraction via Tree-sitter ==
If you frequently need to find or copy the [https://jqlang.org/ JQ] path in a JSON file, you can now use the new command `json-ts-jq-path-at-point'.
This feature was contributed by BinbinYe.
== Automatic Package Suggestions ==
Emacs now has a database of package hints that it can use to suggest installing a package, if your Emacs currently lacks any specific major mode for a file. For instance, if you are editing a .cob (COBOL) file with `package-autosuggest-mode' enabled, a button will appear in the mode line that you can click to confirm installing the new major mode.
This feature was implemented by PhilipKaludercic.
== Elisp Changes ==
=== Functions moved out of cl-lib ===
Elisp now can use the CommonLisp inspired functions/macros `incf', `decf', `evenp', `oddp', `plusp', `minusp', `gensym' without a `cl-' prefix.
These changes were made by StefanKangas.
=== New functions for manipulating lists ===
Generalised versions of `drop' and `take' have been added in the form of `drop-while' and `take-while'. Both take predicates instead of a number of elements, and have efficient compiler macros. These have been used to implement the `any' and `all' higher-order predicates that test if a predicate holds for any/all elements in a list.
These functions have been implemented by MattiasEngdegård, see https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-10/msg00419.html.
=== New macro `cond*' ===
This macro is a generalisation of `cond', allowing the user to bind variables between clauses and perform pattern matching. It is also available on ELPA as "cond-star", so packages can use it without depending on Emacs 31.
The macro was implemented by RichardStallman. Read https://yhetil.org/emacs-devel/E1r3SgH-0007Rb-BU@fencepost.gnu.org/ if you are interested in the motivation behind the macro, and how it compares to `pcase'. Technical discussions on the implementation of the macro can be found here: https://yhetil.org/emacs-devel/E1rQJDv-0001UG-2E@fencepost.gnu.org/.