Emacs 31.1 is finally out! Unlike earlier Emacs versions, there is not a singular big-bang feature in this release. From what I could gather, the new garbage collector was possibly planned for inclusion in Emacs 31.1, but it has been postponed to Emacs 32. But more on that in a future post; it’s an interesting subject.Some of the more notable features in Emacs 31.1 are small, quality of life fixes, and one deprecation that marks the end of an era.As always, my book, Mastering Emacs is 31% off for the next week to celebrate the release also.The unexec/pdumper controversy and subsequent deprecationEmacs is… not a normal application. When you compile and link it, you get temacs which is the heart of Emacs but without most of the libraries that ship with it. It’s a bare-bones Emacs with little more than the C core and the interpreter; it’s not really that useful.To get the Emacs binary you know and love, you have to run temacs and tell it to load the standard library into memory. That is slow. There is a lot of elisp and housekeeping that has to happen. It can take several minutes and a fair bit of CPU and ram to start Emacs this way; it’s untenable.This has been a problem that has dogged Emacs for decades. It’s not a huge deal today, but back in the day it could break the back on home computers or even shared multi-user environments if a brace of enthusiastic Emacs users all decide to launch Emacs at the same time in the morning.The solution to this problem? Load it all in once and then literally dump the text/data/bss/etc. segments of Emacs’s memory to a new binary. Do that, and you don’t have to bootstrap all that Emacs lisp state again and again. It feels like a wrestling move almost. You corral a top-heavy Emacs into position and apply The Attitude Adjustment, body slamming Emacs into a new binary, and everything’s all set up and ready to go.It’s a pretty boss move.But to make this, uh, wrestling move work, Emacs depended on a number of snowflake functions in glibc. After a couple of decades of enabling this sort of bad behavior the glibc team called it quits, and Emacs had to find another way of doing it.Daniel Colascione built a much better solution, though not everyone was happy about it, that – put simply – standardizes the serialization of Emacs’s internal structures into something that is not a 1:1 dump of its internal memory structures.The portable dumper’s been the default for a number of years now. It was first introduced around ten years ago, and in keeping with Emacs’s long history of backwards compatibility, the old unexec dumper was kept around ostensibly for the one or two users who found the idea of a portable dumper risible or unworkable.But now it is finally gone for good. The end of an era.User Lisp DirectoryClassic problem: you git clone or download an Emacs package somewhere and now you want it to work. But how? It’s not that trivial; there are quite a few competing ways of doing it. The simplest one is to tell users to drop their package into the user-lisp/ in your .emacs.d directory and Emacs will sort out loading and setting up autoload (so the right stuff appears in M-x.)Small feature, huge benefit, with a caveat. For some reason use-package has had its :vc feature deprecated; they only just added it in 30.1. Odd.Minibuffer and CompletionsEmacs 30.1 gained completion-preview-mode, a native “pop-up window” system not unlike Company and Corfu, but more attuned to Emacs’s own way of doing things: using the *Completions* window instead of a floating child frame like Company and friends.Emacs 31.1 builds on that with a wide range of customizable options you’re sure to want to customize if you want to go native.Rotating Window LayoutsM-x window-layout-rotate-clockwise (see C-x w C-h for the manifold new options) and suchlike rotate your window layouts. Another little UI winner.Exchanging the point and mark without activating the regionI’ve talked (mostly in the my book) about how transient-mark-mode is a rather awkward one-size-fits-all that was draped over Emacs’s multitude of “region-affecting” commands, like kill-region (C-w).So C-x C-x, that exchanges point and mark, also activates the region whether you want it to or not. Fixing the mark commands in transient mark mode is an old article of mine where I demonstrate how to do exactly that. But now there’s a builtin option to not have it do that — sweet.Tree-sitter now offers to install its grammars for youTwo blockers work in tandem to hold back the wider adoption of tree-sitter in Emacs:The fact that TS demands a special major mode to work; and that said mode is often a thread-bare re-implementation of the original.That installing grammars, especially on Windows, is a giant pain in the neck, as you have to not only thread the needle with the exacting ABI version of the tree-sitter library itself, but also ensure you just the exacting version of each language grammar, or everything goes up in smoke.The former is still a problem, but the latter is now mostly resolved. Emacs can now finally offer to install the right language grammar for TS modes it knows about.Now there’s no excuse not to try out Combobulate: Structured Movement and Editing with Tree-Sitter.and so much moreLots of little tweaks and changes. Have a read.Installation Changes in Emacs 31.1unexec dumper removed.The traditional unexec dumper, deprecated since Emacs 27, has beenremoved.The portable dumper now works on m68k a.out targets.As I wrote in the introduction at the top, this is indeed the end of an era.Emacs's old 'ctags' program is no longer built or installed.You are encouraged to use Universal Ctags instead.For now, to get the old 'ctags' behavior you can can run 'etags --ctags'or use a shell script named 'ctags' that runs 'etags --ctags "$@"'.If you’re a TAGS user you should check with where and make sure you’ve got a newer one installed. (If you don’t know if you use TAGS, you do not.)Changed GCC default options on 32-bit x86 systems.When using GCC 4 or later to build Emacs on 32-bit x86 systems,'configure' now defaults to using the GCC options '-mfpmath=sse' (if thehost system supports SSE2) or '-fno-tree-sra' (if not). These GCCoptions work around GCC bug 58416, which can cause Emacs to behaveincorrectly in rare cases.New configure option '--with-systemduserunitdir'.This allows specifying the directory where the user unit file forsystemd is installed; the default is '${prefix}/usr/lib/systemd/user'.You can tell Emacs to install a systemd service to run Emacs’s server that way. I recommend doing this.Startup Changes in Emacs 31.1In compatible terminals, 'xterm-mouse-mode' is turned on by default.For these terminals the mouse will work by default. A compatibleterminal is one that supports Emacs setting and getting the OS selectiondata (a.k.a. the clipboard) and mouse button and motion events. With'xterm-mouse-mode' enabled, you must use Emacs keybindings to copy to theOS selection instead of terminal-specific keybindings.You can keep the old behavior by customizing 'xterm-mouse-mode' to nil.Most people do not know this but Emacs added mouse support to terminal Emacs years ago but left it off. Terminal capabilities vary widely so that was a nice and safe decision. But now it just works as you’d expect it to: menus are clickable and so forth. Good stuff.site-start.el is now loaded before the user's early init file.Previously, the order was early-init.el, site-start.el and then theuser's regular init file, but now site-start.el comes first. Thisallows site administrators to customize things that can normally only bedone from early-init.el, such as adding to 'package-directory-list'.If you’re on a single user system like your laptop or home computer, this is unlikely to matter much to you.New User Lisp directory feature.If you have a subdirectory "user-lisp/" in your Emacs configurationdirectory, then Lisp files in it and any subdirectories are nowrecursively byte-compiled, scraped for autoload cookies and added to'load-path'.You can disable the feature by setting 'user-lisp-auto-scrape' to nil,and you can customize the option 'user-lisp-directory' to process someother directory instead. There is also a new command'prepare-user-lisp' that you can invoke at any time. See the Info node"(emacs) User Lisp Directory" for more details.Oh this is so useful. I have been cargo culting the same snippets of code around for 23 years to load directories with my stuff in it; yes use-package helps but it’s still a lot of manual hassle. About time!The first client frame now shows warnings from daemon startup.When there are warnings emitted during Emacs startup, usually due toproblems in your initialization file, these are shown in a "*Warnings*"buffer. Until now such warnings were not made visible in the case thatEmacs was started as a daemon. Now the first frame after daemon startupwill show the "*Warnings*" buffer. So for example, starting Emacs witha command like 'emacsclient -a "" -c' will now show "*Warnings*" justlike a plain invocation of 'emacs' would.Bad news. Emacs’s insistence on telling you about every minor stubbed toe in some random package will now plague you even if you’re running Emacs as a daemon. Such a cursed feature. Nobody cares. If it was important it’d be an error.Changes in Emacs 31.1'line-spacing' now supports specifying spacing above the line.Previously, only spacing below the line could be specified. The useroption can now be set to a cons cell to specify spacing both above andbelow the line, which allows you to vertically center text.This is a global value to all of Emacs, it’s not a face setting, so you cannot use M-x customize-face to change it. Set it with setopt or customize ui.New face 'margin' for the window margin display.A new basic face 'margin' is used by default for text displayed in theleft and right margin areas, which are used by various packages forper-line annotations. Its background defaults to the frame defaultbackground, so existing behavior is unchanged for users who do notcustomize this new face.Display strings shown in the margins now inherit unspecified faceattributes from the 'margin' face, if the string itself does not fullyspecify its face. If your code relied on the face of the underlyingbuffer text to serve as a default for any unspecified face attributes ofstrings displayed in the margin, you must now apply those faceattributes to the margin string itself using 'propertize'.'prettify-symbols-mode' attempts to ignore undisplayable characters.Previously, such characters would be rendered as, e.g., white boxes.'standard-display-table' now has more extra slots.'standard-display-table' has been extended to allow specifying glyphsthat are used for borders around child frames and menu separators on TTYframes.Call the command 'standard-display-unicode-special-glyphs' to set up the'standard-display-table's extra slots with Unicode characters. See thedocumentation of that command to see which slots of the display table itchanges.Child frames are now supported on TTY frames.This supports use-cases like Posframe, Corfu, and child frames actinglike tooltips. To enable tooltips on TTY frames, call 'tty-tip-mode'.The presence of child frame support on TTY frames can be checked with'(featurep 'tty-child-frames)'.Recent versions of Posframe and Corfu are known to use child frames onTTYs if they are supported.This is a welcome change for terminal users. Frames in the terminal do not work as they do in GUI — they behave more like tmux/screen “windows”. Here child frames are just inset popups like the ones you find in GUI Emacs.Several font-lock face variables are now obsolete.The following variables are now obsolete: 'font-lock-builtin-face','font-lock-comment-delimiter-face', 'font-lock-comment-face','font-lock-constant-face', 'font-lock-doc-face','font-lock-doc-markup-face', 'font-lock-function-name-face','font-lock-keyword-face', 'font-lock-negation-char-face','font-lock-preprocessor-face', 'font-lock-string-face','font-lock-type-face', 'font-lock-variable-name-face', and'font-lock-warning-face'.These variables contributed both to confusion about the relation betweenfaces and variables, and to inconsistency when major mode authors usedone or the other (sometimes interchangeably). We always recommendedusing faces directly, and not creating variables going by the same name.If you have customized these variables, you should now customize thecorresponding faces instead, using something like: M-x customize-face RET font-lock-string-face RETIf you have been using these variables in Lisp code (for example, infont-lock rules), simply quote the symbol, to use the face directlyinstead of its now-obsolete variable.Note this is not about the faces but about variables named the same as the faces. Yeah that is confusing. Emacs has faces like font-lock-string-face that you probably have customized already. But it also has variables named the same as the faces. The variables are deprecated.If you have configured your faces with M-x customize-face (you should!) you have nothing to worry about.New char-table 'special-mirror-table' for mirroring special glyphs.This char-table is used to mirror special glyphs (truncation andcontinuation) when the user has defined an alternative representationfor those characters via display tables.find-func.el commands now have history enabled.The 'find-function', 'find-library', 'find-face-definition', and'find-variable' commands now allow retrieving previous input using theusual minibuffer history commands. Each command has a separate history.Huh. I never noticed they did not have their own history; now they do. That is good to know I guess but unlikely to affect me much.New minor mode 'find-function-mode' replaces 'find-function-setup-keys'.The new minor mode defines the keys at a higher precedence level thanthe old function, one more usual for a minor mode. To restore the oldbehavior, customize 'find-function-mode-lower-precedence' to non-nil.You’re unlikely to have much of a need to customize this.'find-function' can now find 'cl-defmethod' invocations inside macros.New minor mode 'prettify-special-glyphs-mode'.The new minor mode prettifies the special character glyphs (truncationand continuation) on TTY frames (and GUI frames without fringes). Youcan customize the associated new face 'special-glyphs'.Minibuffer and CompletionsSupport for immediate display of the "*Completions*" buffer.Whenever a minibuffer with completion is opened, then if the completiontable sets the 'eager-display' completion property to non-nil, the"*Completions*" buffer will now be displayed immediately. This propertycan be overridden for different completion categories by customizing'completion-category-overrides'. Alternatively, the new user option'completion-eager-display' can be set to t to force eager display of"*Completions*" for all minibuffers, or nil to suppress this for allminibuffers.Support for updating "*Completions*" as you type.If the "*Completions*" buffer is displayed and the completion table setsthe completion property 'eager-update' to non-nil, then the"*Completions*" buffer will be updated as you type. This property canbe overridden for different completion categories by customizing'completion-category-overrides'. Alternatively, the new user option'completion-eager-update' can be set to t to make "*Completions*" alwaysbe updated as you type, or nil to suppress this always. Note that forlarge or inefficient completion tables, this can slow down typing.'RET' chooses the completion selected with 'M-/M-'.If a completion candidate is selected with 'M-' or 'M-',typing 'RET' will exit completion with that candidate as the result.This works both in minibuffer completion and for in-buffer completion.This feature supersedes 'minibuffer-completion-auto-choose', whichpreviously provided similar behavior; that variable is now nil bydefault.This goes hand in hand with the changes in Emacs 30.1 to make Emacs’s minibuffer completion system behave a little bit more like traditional company/corfu-style completers.I really rate these new inclusions but I do warn they require a fair bit of customization to really get them to behave like something that does not get in your way.Support for completion category inheritance.You can now define completion categories that inherit properties fromexisting categories, using the new function 'define-completion-category'.New optional value of 'minibuffer-visible-completions'.If the value of this option is 'up-down', only the '' and ''arrow keys move point between candidates shown in the "*Completions*"buffer display, while '' and '' arrows move point in theminibuffer.New user option 'completion-pcm-leading-wildcard'.This option configures how the partial-completion style does completion.It defaults to nil, which preserves the existing behavior. When it isset to t, the partial-completion style behaves more like the substringstyle, in that the input can match a candidate anywhere in the candidatestring.Another minor tweak to a completion style to make it behave more like something it once did. Emacs has a diverse set of completion styles. The default have changed a lot over the years, sometimes to the chagrin of people who were used to the quirks of a now-relegated default style. For example there’s both an emacs21 and an emacs22 completion style in completion-styles-alist. But see Understanding Minibuffer Completion for more information.'completion-styles' now can contain lists of bindings.In addition to a symbol naming a completion style, an element of'completion-styles' can now be a list of the form '(STYLE ((VARIABLEVALUE) ...))' where STYLE is a symbol naming a completion style.VARIABLE will be bound to VALUE (without evaluating it) while the styleis executing. This allows multiple references to the same style withdifferent values for completion-affecting variables like'completion-pcm-leading-wildcard' or 'completion-ignore-case'. Thisalso applies to the styles configuration in'completion-category-overrides' and 'completion-category-defaults'.Oh man. That is niche. completion-styles is a shopping list of how Emacs must match things in stuff like the minibuffer’s completer. Now you can make it so initials ignores case but substring does not.Navigating "*Completions*" now accommodates 'completions-format'.When 'completions-format' is set to 'vertical', typing 'n', 'TAB' or'M-' in the "*Completions*" buffer (the latter also in theminibuffer) now moves point to the completion candidate in the next linein the current column, and wraps to the next column after the lastcompletion candidate of the current column. Likewise, typing 'p','S-TAB' or 'M-' moves point to the completion candidate in theprevious line or wraps to the previous column. Previously, these keysignored the vertical format, i.e., they moved point only to the item inthe same line of the next or previous column, in accordance with thedefault horizontal format. In the vertical format, typing '' and'' in the "*Completions*" buffer (and when'minibuffer-visible-completions' is non-nil, also in the minibuffer)moves point only within the current line, analogously to how, in thehorizontal format, '' and '' move point only within thecurrent column.You’ll want to configure this for sure if you are intent on using the Completions buffer and window for in-buffer completion. I always found navigating between the tabular structure in completions to be a bit weird and offputting; it’s a good use of space, for sure, but a flat list of matches is much easier to reason about.Selected completion candidate is preserved across "*Completions*" updates.When the window point is on a completion candidate in the"*Completions*" buffer (because of 'minibuffer-next-completion' or forany other reason), it will remain on that candidate after the"*Completions*" is updated with a new list of completions. Thecandidate is deselected when the "*Completions*" buffer is hidden."*Completions*" is now displayed faster when there are many candidates.As before, if there are more completion candidates than can be displayedin the current frame, only a subset of the candidates is displayed.This process is now faster: only that subset of the candidates isactually inserted into "*Completions*" until you run a command whichinteracts with the text of the "*Completions*" buffer. Thisoptimization only applies when 'completions-format' is 'horizontal' or'one-column'.New user option 'crm-prompt' for 'completing-read-multiple'.This option configures the prompt format of 'completing-read-multiple'.By default, the prompt indicates to the user that the completion commandaccepts a comma-separated list. The prompt format can include theseparator description and the separator string, which are both stored astext properties of the 'crm-separator' regular expression.It’s a pretty rare feature, that. You can “toggle-select” multiple matches from the minibuffer; few things use it, to be honest. I find the user experience rather poor if I am perfectly honest, no matter the completer. Helm is one of the few tools I think that does it well.For a practical example of multi-select see Fuzzy Finding with Emacs Instead of fzf.New user option 'completion-preview-sort-function'.This option controls how Completion Preview mode sorts completioncandidates. If you use this mode together with an in-buffer completionpopup interface, such as the interfaces that the GNU ELPA packages Corfuand Company provide, you can set this option to the same sort functionthat your popup interface uses for a more integrated experience.('completion-preview-sort-function' was already present in Emacs 30.1,but as a plain Lisp variable, not a user option.)New user option 'completion-preview-inhibit-functions'.This option provides fine-grained control over Completion Preview modeactivation. You can use it to specify arbitrary conditions in which toinhibit the mode's operation.Another thing you’ll want to customize. You may want certain movement commands like those used in paredit or combobulate commands to not trigger the completion window.New mode 'minibuffer-nonselected-mode'.This mode, enabled by default, directs attention to the activeminibuffer window in the case the minibuffer window is no longerselected, but still waiting for input. This uses the new'minibuffer-nonselected' face.I like this. I am glad it is enabled by default; it can be a little bit confusing not having a selected/non-selected state.'read-multiple-choice' now uses the minibuffer to read a character.It still can use 'read-key' when the variable'read-char-choice-use-read-key' is non-nil.'map-y-or-n-p' now uses the minibuffer to read a character.It still can use 'read-key' when the variable'y-or-n-p-use-read-key' is non-nil.Ugh. They mucked around with the default method used for answering “yes or no” prompts in Emacs to make it more like a regular minibuffer thing instead and it caught me out by surprise some years ago when they did that, and it was a pain to track down. Keep you eye on this one if you’re of a similar mind to me on this.'flex' completion style rewritten to be faster and more accurate.Completion and highlighting use a new, superior algorithm. For example,pattern "scope" now ranks 'elisp-scope-*' functions well above'dos-codepage' and 'test-completion'. Pattern "botwin" finds'menu-bar-bottom-window-divider' before 'ibuffer-other-window'.Flex matching is an ido-mode feature, and I believe this is strictly speaking a reimplementation of it for the fido-mode completer built on the “new” minibuffer completion system. See Introduction to Ido Mode for IDO mode; and Understanding Minibuffer Completion for the latter.MouseNew mode 'mouse-shift-adjust-mode' extends selection with 'S-'.When enabled, you can use the left mouse button with the '' modifierto extend the boundaries of the active region by dragging the mouse pointer.Cool. I rarely drag-select stuff in Emacs, but for finicky stuff it does actually work faster than a keyboard if it’s a one-off.'context-menu-mode' now includes a "Send to..." menu item.The menu item enables sending current file(s) or region text to external(non-Emacs) applications or services. See send-to.el for customizations.Oh my this is great. M-x context-menu-mode itself is a reasonably new feature itself (Emacs 28) and is not on by default. It adds contextual right-click menus to stuff. I have not kept abreast with all the places it has had custom commands added to it, and as the default is a bit… barebones, I can imagine most people bounced right off.You can manually trigger the context menu mode (minor mode active or not) with M-x context-menu-open.The mouse now drags lines in character increments again.Dragging a horizontal or vertical line like the mode line or the linesdividing side-by-side windows now happens in increments of thecorresponding frame's character size again. This is the behaviordescribed in the manual and was the default behavior before'window-resize-pixelwise' was added for Emacs 24.1. To drag in pixelincrements, as with Emacs 24 through Emacs 30, customize'window-resize-pixelwise' to t.WindowsNew commands to modify window layouts of frames.'window-layout-rotate-clockwise' ('C-x w r ') and its counterpart'window-layout-rotate-anticlockwise' ('C-x w r ') rotate an entirewindow layout.'window-layout-flip-topdown' ('C-x w f ', 'C-x w f ') and'window-layout-flip-leftright' ('C-x w f ', 'C-x w f ')flip the window layout vertically and horizontally.'window-layout-transpose' ('C-x w t') reorganizes windows such thatevery horizontal split becomes a vertical split and vice versa.'rotate-windows' ('C-x w o ') and its counterpart'rotate-windows-back' ('C-x w o ') rotate windows in cyclicordering.Oh I love this. But I’ll probably just pick one direction, clockwise or whatever, and bind that to an easy-to-reach key and suffer the indignity of tapping a few times. It is not often I wish to do this sort of thing. I’m a bit curious though because I am guessing the implementation will cycle through all nodes (Emacs’s window tiling window splits are represented as a tree structure) in the tree — try M-: (window-tree) to see the internal representation.New user option 'rotate-windows-change-selected'.This controls whether 'rotate-windows' and 'rotate-windows-back' changethe selected window. If nil, the selected window does not change.The default is t, which means the new selected window will be the onethat winds up at the location of the previously-selected window.Rotate windows but not move with it? Not for me, thanks.New user option 'transpose-dedicated-windows'.This controls how functions transposing or rotating windows handlededicated windows. The default is nil, which causes these function tosignal an error if they encounter a dedicated window.Yeah you’ll want this at nil; dedicated windows are sticky windows. Rotating them around is probably not what you intend — or maybe it is, if you have a peculiar workflow.Windmove commands now move to skipped windows if invoked twice in a row.The new user option 'windmove-allow-repeated-command-override' controlsthis behavior: if it is non-nil, invoking the same windmove command twiceoverrides the 'no-other-window' property, allowing navigation to windowsthat would normally be skipped. The default is t; customize it to nilif you want the old behavior.C-x o taps through windows as you probably know. But you can flag a window (see Demystifying Emacs’s Window Manager) as no-other-window so it is exempt from that command. Windmove of course lets you move between windows using your arrow keys.New hook 'window-deletable-functions'.This abnormal hook gives its client a way to save a window from beingdeleted implicitly by functions like 'kill-buffer', 'bury-buffer' and'quit-restore-window'.Emacs always had a weird, disconnected relationship between buffers and windows, as anybody who has ever tried to tame the window manager (see previously mentioned article) so this feels like another patch on top of what is a pretty irreconcilable problem: how do you keep two things that can be interchanged easily from manipulating something the user/package does not want it to? With more hooks, it seems…Buffer-local window change functions now run in their buffers.Running the buffer-local version of each of the abnormal hooks'window-buffer-change-functions', 'window-size-change-functions','window-selection-change-functions' and 'window-state-change-functions'will make the respective buffer temporarily current while running thehook.'window-buffer-change-functions' is run for removed buffers too.The buffer-local version of 'window-buffer-change-functions' may now berun twice: once for the buffer removed from the window and once for thebuffer now shown in that window.New user option 'quit-window-kill-buffer'.This option specifies whether 'quit-window' should preferably kill orbury the buffer shown by the window to quit. The default is nil.Customize it to t to always kill the buffer; customize to a list ofmajor modes to kill if the buffer's major mode is one of those.New user option 'kill-buffer-quit-windows'.This option has 'kill-buffer' call 'quit-restore-window' to handle thefurther destiny of any window showing the buffer to be killed.'split-window' can optionally resurrect deleted windows.A new optional argument REFER of 'split-window' makes it possible to,instead of making a new window object, reuse an existing, deleted one.This can be used to preserve the identity of windows when swapping ortransposing them.New window parameter 'quit-restore-prev'.This parameter is set up by 'display-buffer' when it detects that thewindow used already has a 'quit-restore' parameter. Its presence gives'quit-restore-window' a way to undo a sequence of buffer displayoperations more intuitively.'quit-restore-window' handles new values for BURY-OR-KILL argument.The values 'killing' and 'burying' are like 'kill' and 'bury' but assumethat the actual killing or burying of the buffer is done by the caller.New user option 'quit-restore-window-no-switch'.With this option set, 'quit-restore-window' will delete its window moreaggressively rather than switching to some other buffer in it.Ahem yeah - as above. All these things are just ointment balmed on Emacs to try and solve an intractable problem. If you let a window host anything, and a buffer jump around and open anywhere (either mechanically or by the whim of the user) then… how do you lock it down properly if you want something IDE-like?I like the idea of these things. And I predict few will ever really make use of them, even in packages.The user option 'display-comint-buffer-action' has been removed.It has been obsolete since Emacs 30.1. Use '(category . comint)'instead. Another user option 'display-tex-shell-buffer-action' has beenremoved too, for which you can use '(category . tex-shell)'.Nothing much to worry about.New user option 'split-window-preferred-direction'.Functions called by 'display-buffer' split the selected window when theyneed to create a new window. A window can be split either vertically(one below the other) or horizontally (side by side). This new optiondetermines which direction will be tried first in the case that bothdirections are possible according to the values of'split-width-threshold' and 'split-height-threshold'. The default valueis 'longest', which means to prefer to split horizontally if thewindow's frame is a "landscape" frame, and vertically if it is a"portrait" frame. (A frame is considered to be portrait if its verticaldimension in pixels is greater or equal to its horizontal dimension,otherwise it is considered to be landscape.) Previous versions of Emacsalways tried to split vertically first, so to get the previous behavior,you can customize this option to 'vertical'. The value 'horizontal'always prefers the horizontal split.Good news if you hated the random nature of window splits. Now you’ll have a little bit of control over which direction at least. I recommend you make a note of this and if you find it aggravating that it splits things the wrong way, do set it.The default value of 'split-width-threshold' is reduced from 160 to 150.We believe that, after splitting, text filled to 75 columns remainscomfortable to read.No arguments here.New optional argument INDIRECT for 'get-buffer-window-list'.With this argument non-nil, 'get-buffer-window-list' will include in thereturn value windows whose buffers share their text with BUFFER-OR-NAME.New 'display-buffer' action alist entry 'reuse-indirect'.With such an entry, 'display-buffer-reuse-window' may also choose awindow whose buffer shares text with the buffer to display.Indirect buffers are a power user feature. If you want to do separate things in the same buffer, you can split and “point” your new window to an already-visited buffer in another window, but then you’ll run into awkward things like shared major modes, the point not always remembering the right place you were because of how points and windows work. An indirect buffer points to a base buffer that you clone from; it is the same underlying text, but everything else is separate (like major mode)New variable 'window-state-normalize-buffer-name'.When bound to non-nil, 'window-state-get' will normalize 'uniquify'managed buffer names by removing 'uniquify' prefixes and suffixes. Thishelps to restore window buffers across Emacs sessions.New action alist entry 'this-command' for 'display-buffer'.You can use this in 'display-buffer-alist' to match buffers displayedduring the execution of particular commands.That’s really cool, but will it work well if you trigger stuff through stuff like magit’s gnarly dispatchers or orgs’?New command 'other-window-backward' ('C-x O').This moves in the opposite direction of 'other-window' and is for itsdefault keybinding consistent with 'repeat-mode'.No more need for using the negative prefix argument to go backwards.New functions 'combine-windows' and 'uncombine-window'.'combine-windows' is useful to make a new parent window for severaladjacent windows and subsequently operate on that parent.'uncombine-window' can then be used to restore the window configurationto the state it had before running 'combine-windows'.I wonder how this fits into atomic windows which are another way of ‘combining’ windows. I am sure there is a substantial difference, perhaps because this one is not tied at all to display-buffer-alist.New function 'window-cursor-info'.This function returns a vector of pixel-level information about thephysical cursor in a given window, including its type, coordinates,dimensions, and ascent.FramesNew function 'frame-deletable-p'.If this function returns nil, the following call to 'delete-frame' mightfail to delete its argument FRAME or might signal an error. It istherefore advisable to use this function as part of a condition thatdetermines whether to call 'delete-frame'.New function 'frame-use-time'.This function is the frame equivalent of the function 'window-use-time'for a window. The result is the 'window-use-time' of the frame's mostrecently used window.New functions 'get-mru-frames' and 'get-mru-frame'.'get-mru-frames' returns a list of frames sorted by their most recentuse time, among all frames, or among those visible or iconified on thesame terminal as the selected frame. Child frames can be excluded. Asingle frame can be excluded (e.g. the selected frame). 'get-mru-frame'returns the single most recently used frame.After deleting, 'delete-frame' now selects the most recently used frame.Previously, after deleting a specified frame, 'delete-frame' wouldselect the oldest visible frame on the same terminal. To revert to theold behavior, set the new user option 'delete-frame-choose-selected'to nil.I am not a massive frame user as I never found the customization to make it work the way I liked it worth the effort, even though I do also use a tiling WM. But returning to the last seen frame does seem like an odd thing to only add now; this will no doubt restore the same of people who prefer frame-only approaches to windows.New value 'force' for user option 'frame-inhibit-implied-resize'.This will inhibit implied resizing while a new frame is made. It can beuseful on tiling window managers where the initial frame size should bespecified by external means.New user option 'alter-fullscreen-frames'.This option is useful to maintain a consistent state when attempting toresize fullscreen frames. It defaults to 'inhibit' on NS builds whichmeans that a fullscreen frame will not change size. It defaults to nileverywhere else, which means that the window manager is supposed toeither resize the frame and change the fullscreen status accordingly, orkeep the frame size unchanged. The value t means to first reset thefullscreen status and then resize the frame.New functions to set frame size and position in one compound step.'set-frame-size-and-position' sets the new size and position of a framein one compound step. Both size and position can be specified as withthe corresponding frame parameters 'width', 'height', 'left' and 'top'.'set-frame-size-and-position-pixelwise' is similar but has a morerestricted set of values for specifying size and position.New commands 'split-frame' and 'merge-frames'.'split-frame' moves a specified number of windows from an existing frameto a newly-created frame. 'merge-frames' merges all windows from twoframes into one of these frames and deletes the other one.Frames can now be renamed to "F" on text terminals.Unlike with other frame names, an attempt to rename to "F"signals an error when a frame of that name already exists.As I mentioned earlier frames in terminal Emacs are really just another way of doing a window configuration / screen-style “window pane”.New frame parameters 'cloned-from' and 'undeleted'.The frame parameter 'cloned-from' is set to the frame from which the newframe is cloned using the command 'clone-frame'.The frame parameter 'undeleted' is set to t when a frame is undeletedusing the command 'undelete-frame'.These are useful if you need to detect a cloned or undeleted frame inhooks like 'after-make-frame-functions' and'server-after-make-frame-hook'.Frames now have unique ids and the new function 'frame-id'.Each non-tooltip frame is assigned a unique integer id. This allows youto unambiguously identify frames even if they share the same name ortitle. When 'undelete-frame-mode' is enabled, each deleted frame's idis stored for resurrection. The function 'frame-id' returns a frame'sid (in C, use the frame struct member 'id').New commands 'select-frame-by-id', 'undelete-frame-by-id'.The command 'select-frame-by-id' selects a frame by ID and undeletes itif deleted. The command 'undelete-frame-by-id' undeletes a frame by itsID. When called interactively, both functions prompt for an ID.Mode LineNew definitions for mode line faces on dark backgrounds.The faces 'mode-line' and 'mode-line-highlight' now have separatedefinitions for dark backgrounds. Previously, these two faces lookedthe same with both light and dark background modes. To get the previousvisuals for these two faces, customize them to have the colors "grey75"and "grey40", respectively, regardless of the background mode.New user option 'mode-line-collapse-minor-modes'.This is a new, built-in facility to hide minor mode lighters. Ifnon-nil, minor mode lighters on the mode line are collapsed into asingle button. The value can also be a list to specify minor modelighters to hide or show. The default value is nil, which retains theprevious behavior of showing all minor mode lighters.One of my earliest articles was Hiding and replacing modeline strings with clean-mode-line. It’s been an issue as long as mode authors have had a say in how loud their mode line lighters should be.Glad it is finally built in. No word on whether it plugs into :delight / :diminish in use-package.New user option 'mode-line-modes-delimiters'.This option allows changing or removing the delimiters shown aroundthe major mode and list of minor modes in the mode line. The defaultretains the existing behavior of using parentheses.New minor mode 'mode-line-invisible-mode'.This minor mode makes the mode line of the current buffer invisible.The command 'mode-line-invisible-mode' toggles the visibility of thecurrent-buffer's mode line. The default is to show the mode line ofevery buffer.People do ask for this all the time, so it’s good to see a built in feature to do this instead of all the hacky tricks people got up to before.The standard mode line no longer specifies minimum widths.The default values for the 'mode-line-position' variable and'mode-line-format' user option no longer specify any minimum widths. Ifyou use a proportional font for your mode line, you may need tocustomize the values of these variables to include minimum widths again.Tab Bars and Tab LinesTab bars are window configurations you switch between; tab lines are like browser tabs that point to buffers in the window.New commands 'split-tab' and 'merge-tabs'.'split-tab' moves a specified number of windows from an existing tab toa newly created tab. 'merge-tabs' merges all windows from two tabs intoone of these tabs, and closes the other.New abnormal hook 'tab-bar-auto-width-functions'.This hook allows you to control which tab-bar tabs are auto-resized.'mouse-face' properties are now supported on the 'tab-bar'.'tab-bar' tab buttons are now highlighted when the mouse pointerhovers over them. You can customize the new face'tab-bar-tab-highlight'.New abnormal hook 'tab-bar-post-undo-close-tab-functions'.This hook allows you to operate on a reopened tab.This is useful when you define custom tab parameters that may needadjustment when a tab is restored, without resorting to advice.I do actually end up closing tab bar tabs by mistake quite often. And it has had an undo feature C-x t u to fix screwups like that for a long time now.Tabs are now closed upon releasing the middle mouse button.Previously, closing the tab-bar's tabs occurred upon pressing thebutton.New user option 'tab-bar-define-keys'.This controls which key bindings tab-bar creates. Values are t, thedefault, which defines all keys and is backwards compatible, 'numeric'for tab number selection only, 'tab' for the 'TAB' and 'S-TAB' keysonly, and nil for none.This is useful to avoid key binding conflicts, such as when folding inoutline mode using 'TAB' keys, or when a user wants to define her owntab-bar keys without first having to remove the defaults.New variable 'tab-bar-format-tab-help-text-function'.This variable may be overridden with a user-provided function tocustomize the help text for tabs displayed on the tab-bar. Help text isnormally shown in the echo area or via tooltips. See the variable'sdocstring for the arguments passed to a help-text function.New variable 'tab-bar-truncate'.When non-nil, it truncates the tab bar, and therefore preventswrapping and resizing the tab bar to more than one line.New user option 'tab-line-define-keys'.When t, the default, it redefines window buffer switching keyssuch as 'C-x ' and 'C-x ' to tab-line specific variantsfor switching tabs.New command 'tab-line-move-tab-forward' ('C-x M-').Together with the new command 'tab-line-move-tab-backward'('C-x M-'), it can be used to move the current tabon the tab line to a different position.New command 'tab-line-close-other-tabs'.It is bound to the tab's context menu item "Close other tabs".New user option 'tab-line-exclude-buffers'.This user option controls where 'tab-line-mode' should not be enabled ina buffer. The value must be a condition which is passed to'buffer-match-p'.New user option 'tab-line-close-modified-button-show'.With this user option, if non-nil (the default), the tab close buttonwill change its appearance if the tab's selected buffer has beenmodified.New user option 'tab-line-tabs-window-buffers-filter-function'.This user option controls which buffers should appear in the tab line.By default, this is set so as to not filter out any buffers.Aha this is useful. One problem with tab line is that it’s quite indiscriminate; it won’t show hidden buffers by default (they start with a whitespace) obviously but it’s still a bit heavyhanded. Now you can at least limit what you see.New faces 'tab-line-active' and 'tab-line-inactive'.These inherit from the 'tab-line' face, but the faces actually used onthe tab lines are now these two: the selected window uses'tab-line-active', and non-selected windows use 'tab-line-inactive'.HelpNew binding 'C-h u' for 'apropos-user-option'.IDLWAVE has moved to GNU ELPA.The version included with Emacs is out-of-date, and is now marked asobsolete. Use 'list-packages' to install the 'idlwave' package from GNUELPA instead.New faces 'header-line-active' and 'header-line-inactive'.These inherit from the 'header-line' face, but the faces actually usedon the header lines are now these two: the selected window uses'header-line-active', and non-selected windows use 'header-line-inactive'.Useful; header line is an immovable header that appears at the top of a window. It is commonly used for things like column headers in tables, as seen in M-x list-packages.In 'customize-face', the "Font family" attribute now supports completion.Heavenly manna indeed. I have long argued that all this complex futzing around with .Xresources, frame-setting faces and all manner of complicated ways of setting your default font is a bad habit and that M-x customize-face RET default RET is the simplest and most effective compared to the alternatives. Well, you don’t have to guess at the names of fonts any more! Emacs is finally capable of auto completing them. Excellent change.'process-adaptive-read-buffering' is now nil by default.Setting this variable to a non-nil value reduces performance and leadsto wrong results in some cases. We believe that it is no longer useful;please contact us if you still need it for some reason.Another toggle switch to maybe possibly potentially speed Emacs up a tad; it’s part of a growing list of these magic feature toggles that may or may not have adverse consequences down the road. I checked my Emacs and mine is set to nil. I do not recall why I set it to nil, nor can I remember when.'byte-compile-cond-use-jump-table' is now obsolete.Modified settings for an enabled theme now apply immediately.Evaluating a 'custom-theme-set-faces' or 'custom-theme-set-variables'call for an enabled theme causes the settings to apply immediately,without a need to re-load the theme.'describe-variable' now automatically says if 'setopt' is needed.If a user option has a defcustom ':set' function, users will normallyneed to set it with 'setopt' for it to take an effect. If the docstringdoesn't already mention 'setopt', the 'describe-variable' command willnow add a note about this automatically.One of the greatest challenges in Emacs is convincing people - including yours truly - to stop using setq to bind values to global/customizable variables. Emacs’s customize system – defined as anything you can edit with M-x customize – supports edge triggers: code that runs when one of its variables change. It was once uncommon enough that nobody really had to worry; more and more things in Emacs lean into this system though.The primary reason people use setq is that it just kinda-sorta works (notwithstanding the edge-trigger) but also because the proper way to set variables via customize’s machinery is custom-set-variables which is an obnoxious utility function that not only has a bad prefix namespace custom vs customize but also it’s just so damn long to type.So nobody bothered to use it. Emacs 29.1 added setopt which automatically does all the heavy lifting and it’s a drop-in replacement for setq.New user option 'eldoc-help-at-pt' to show help at point via ElDoc.When enabled, display the 'help-at-pt-kbd-string' via ElDoc. Thissetting is an alternative to 'help-at-pt-display-when-idle'.Eldoc is Emacs’s help/document/code argument lookup system that actives when you move point around. It relies on a complex timing machinery to trigger the help. Forcing it to appear at point (even if that is nearly always your current point) is a great utility function. Now you can have eldoc without the timer: bind it to a key when you need it and off it goes.New user option 'native-comp-async-on-battery-power'.Customize this to nil to disable starting new asynchronous nativecompilations while AC power is not connected.Somewhere someone with a laptop more dinged-up than Zildjian cymbal lost their last 5% of battery to native comp and furiously decided to solve this problem once and for all.New user option 'show-paren-not-in-comments-or-strings'.If this option is non-nil, it tells 'show-paren-mode' not to highlightparens inside comments and strings. If set to 'all', 'show-paren-mode'will never highlight parens that are inside comments or strings. If setto 'on-mismatch', mismatched parens inside comments and strings will notbe highlighted. If set to nil (the default), highlight parens whereverthey are.Show paren of course is Emacs paren highlighter, though its name today is doing it a disservice as it is designed to highlight like terms like braces, string quotes or things like begin and end terms.New user option 'view-lossage-auto-refresh'.If this option is non-nil, the lossage buffer of 'view-lossage' will berefreshed automatically for each new input keystroke and commandinvoked.Lossage is C-h l and it reflects the last N number of typed keys in your Emacs. With auto-refresh enabled you can simulate basic version of those “keypress overlays” people use in streaming videos. Useful for gifs too!Change in SVG foreground color handling.SVG images no longer have the 'fill' attribute set to the value of':foreground' or the current text foreground color. The 'currentcolor'CSS attribute is still set, as before.This change should result in more consistent display of SVG images.To use the ':foreground' or current text color ensure the 'fill' attributein the SVG is set to 'currentcolor', or set the image spec's ':css'value to 'svg {fill: currentcolor;}'.Errors signaled by 'emacsclient' connections can now enter the debugger.If 'debug-on-error' is non-nil, errors signaled by Lisp programsexecuted by 'emacsclient' connections will now enter the Lisp debuggerand show a backtrace. If 'debug-on-error' is nil, these errors will besent to 'emacsclient', as before, and will be displayed on the terminalfrom which 'emacsclient' was invoked.Empty string arguments to emacsclient are no longer ignored.Emacs previously discarded arguments to emacsclient of zero length, suchas in 'emacsclient --eval "(length (pop server-eval-args-left))" ""'.These are no longer discarded.Huh. That may have explained some weird issues I’ve run into calling evals into emacsclient over the years. I always just assumed I did something wrong!Emacs now uses the 'setrgbf' and 'setrgbb' terminfo capabilities.Emacs now uses 24-bit colors on terminals that support the 'setrgbf' and'setrgbb' user-defined terminfo capabilities. These are supported bymore terminals and applications than the old capabilities, 'setf24' and'setb24', which are now obsolete.I’m not an expert on termcaps so I cannot say what these caps offer people, but Emacs already supports 24-bit if you did not know. In fact, you can just set the environment variable COLORTERM=truecolor to force Emacs to treat your terminal as 24-bit capable.New user option 'xterm-update-cursor' to update cursor display on TTYs.When enabled, Emacs sends Xterm escape sequences on Xterm-compatibleterminals to update the cursor's appearance. Emacs can update thecursor's shape and color. For example, if you use a purple bar cursoron graphical displays then when this option is enabled Emacs will use apurple bar cursor on compatible terminals as well. See the Info node"(emacs) Cursor Display" for more information.Neat. The highlight of course being that Emacs has multiple cursor styles. See M-x customize-option cursor-type.New command 'copy-theme-options'.You can use this command to copy options from a theme into your userconfiguration.New user option 'multiple-terminals-merge-keyboards'.Customizing this option to non-nil disables entering single-keyboardmode in most cases in which Emacs would by default enter that mode.This can make things work better for some cases of X forwarding; see theInfo node "(emacs) Multiple Displays".Emacs now comes with Org v9.8.See the file "etc/ORG-NEWS" for user-visible changes in Org.New user option 'compilation-search-extra-path'.compile.el will now use paths specified in both'compilation-search-extra-path' and 'compilation-search-path' whensearching. 'compilation-search-extra-path' is consulted first. Onepossible use case for this option is to add new search paths on aper-project basis with directory-local variables.Editing Changes in Emacs 31.1Commands for keyboard translation.'key-translate' is now interactive. It prompts for a key to translatefrom, and another to translate to, and sets 'keyboard-translate-table'.The new command 'key-translate-remove' prompts for a key/translationpair, with 'completing-read', and removes the translation from thetranslation table.My article on Mastering Key Bindings in Emacs is a good place to start on key bindings.But it is not a good article to understand keyboard translation. Even I am not crazy enough to try to write an article that explains that. I spent nearly a full day trying to trace a weird keyboard translation issue in Combobulate that only manifests in some terminals with some key bindings and only in Combobulate’s complicated “carousel interface”.The translation system – and how it plugs into your OS, tty, etc. – and trying to fully understand it will make you go crazy.InternationalizationEmacs now supports Unicode Standard version 17.0.New input method 'greek-polytonic'.This input method has support for polytonic and archaic Greekcharacters.New language environment and input method for Tifinagh.The Tifinagh script is used to write the Berber languages.New input methods for Northern Iroquoian languages.Input methods are now implemented for Haudenosaunee languages in theNorthern Iroquoian language family: 'mohawk-postfix' (Mohawk[Kanien’kéha / Kanyen’kéha / Onkwehonwehnéha]), 'oneida-postfix' (Oneida[Onʌyote’a·ká· / Onyota’a:ká: / Ukwehuwehnéha]), 'cayuga-postfix'(Cayuga [Gayogo̱ho:nǫhnéha:ˀ]), 'onondaga-postfix' (Onondaga[Onųdaʔgegáʔ]), 'seneca-postfix' (Seneca [Onödowá’ga:’]), and'tuscarora-postfix' (Tuscarora [Skarù·ręʔ]). Additionally, there is ageneral-purpose 'haudenosaunee-postfix' input method to facilitatewriting in the orthographies of the six languages simultaneously.New input methods for languages based on Burmese.These include: Burmese, Burmese (visual order), Shan, and Mon.New language environment and input methods for Syriac languages.A new language environment for languages that use the Syriac script:Classical Syriac, Aramaic, and others. There are two new input methodsfor these languages: Syriac and Syriac (phonetic).'visual-wrap-prefix-mode' now supports variable-pitch fonts.When using 'visual-wrap-prefix-mode' in buffers with variable-pitchfonts, the wrapped text will now be lined up correctly so that it isexactly below the text after the prefix on the first line.Visual wrap prefix mode, not to be confused with truncating long lines (M-x toggle-truncate-lines) or visual line mode (M-x visual-line-mode) deals with text that overflow one line and how it is wrapped. I’m not going to get into which one does what; try them out in turn and see which one works best.New commands 'unix-word-rubout' and 'unix-filename-rubout'.Unix-words are words separated by whitespace regardless of the buffer'ssyntax table. In a Unix terminal or shell, 'C-w' kills by Unix-word.The new commands 'unix-word-rubout' and 'unix-filename-rubout' allowyou to bind keys to operate more similarly to such a terminal.Emacs having it all, you’d think – especially given its roots – it would already a panoply of methods for doing this.Honestly even if you’re a die-hard fan of this method of killing I would unlearn that habit. Emacs’s combined system of moving-editing-killing by word and so forth is far superior.New user option 'kill-region-dwim'.This option, if non-nil, modifies the fall-back behavior of'kill-region' ('C-w') if no region is active, and will kill the lastword instead of raising an error. If you have disabled Transient Markmode you might prefer to bind 'unix-word-rubout' to a key instead.No see this is not the right way forward. C-w and M-w absent a region should kill the current line and copy it respectively. That is a far more sensible approach than fall back to dumb non-TMM behavior as it does pre-Emacs 31.Here is the code I stole from Emacswiki 20+ years ago to do exactly this. One of my favorite Emacs life hacks:(defadvice kill-ring-save (before slick-copy activate compile) "When called interactively with no active region, copy a single line instead." (interactive (if mark-active (list (region-beginning) (region-end)) (list (line-beginning-position) (line-beginning-position 2)))))(defadvice kill-region (before slick-cut activate compile) "When called interactively with no active region, kill a single line instead." (interactive (if mark-active (list (region-beginning) (region-end)) (list (line-beginning-position) (line-beginning-position 2)))))New user option 'delete-pair-push-mark'.This option, if non-nil, makes 'delete-pair' push a mark at the end ofthe region enclosed by the deleted delimiters. This makes it easy toact on that region. For example, you can highlight it using 'C-x C-x'.Now this is useful. M-x delete-pair (typically not bound to anything) is a long line of helpful editing commands that, alongside things like M-x raise-sexp do not get their time in the sun as they are unbound by default.One common problem with deleting a little bit here and a little bit over there is exactly that Emacs does not make it easy to capture the extent over the change that took place. Pushing a mark (Emacs’s little point beacon system) is an obvious choice here.Electric Pair modeElectric Pair mode can now pair multiple delimiters at once.You can now insert or wrap text with multiple sets of parentheses andother matching delimiters at once with Electric Pair mode, by providinga prefix argument when inserting one of the delimiters.Neat but I will never remember this. I do not subscribe to the school of “think before you type” where you count your steps and then use the right numeric argument.Electric Pair mode now supports multi-character paired delimiters.'electric-pair-pairs' and 'electric-pair-text-pairs' now allow usingstrings for multi-character paired delimiters.To use this, add a list to both electric pair user options: '("/*" . "*/")'.You can also specify that an extra space should be inserted after thefirst string, like this: '("/*" " */" t)'.Electric pair is a god-send in that it is a million times better than the hacky skeleton template system most of us lugged around before it became standard in Emacs a long time ago. But once again this is the sort of functionality you’d expect it could already do out of the box. Emacs’s own core is written in C where /* */ is used all the time for comments!New user option 'electric-indent-actions'.This user option specifies a list of actions to reindent. The possibleelements for this list are: 'yank' to reindent the yanked text, and'before-save' to indent the whole buffer before saving it.As always, how well this works in whitespace-sensitive languages remains to be seen. I know from experience how difficult it is to corral the indentation engines into handling this well; so for Python and such like it really can’t do much more than fixed indentation.You can now use 'M-~' during 'C-x s' ('save-some-buffers').Typing 'M-~' while saving some buffers means not to save the buffer andalso to mark it as unmodified. This is an alternative way to mark abuffer as unmodified which doesn't require switching to that buffer.M-~ generally speaking is a key binding for the “is this buffer modified in Emacs” flag. Most people do not know about this obscure command.New minor mode 'delete-selection-local-mode'.This mode sets 'delete-selection-mode' buffer-locally. This can beuseful for enabling or disabling the features of 'delete-selection-mode'based on the state of the buffer, such as for the different states ofmodal editing packages.Delete selection mode is how most editors work: you select text, and if you start typing, it is deleted and replaced with what you just typed. In Emacs, you have to enable a mode to get this functionality.New user option 'exchange-point-and-mark-highlight-region'.When set to nil, this modifies 'exchange-point-and-mark' so that it doesn'tactivate the mark if it is not already active.The default value is t, which retains the old behavior.This variable has no effect when Transient Mark mode is off.I have been cargo culting an advice for this exact misbehavior around for the better part of 15 years. See Fixing the mark commands in transient mark mode.C-x C-x is another hidden gem in Emacs. Emacs has point (your cursor) and mark (a beacon somewhere in your buffer) and back in the good old days Emacs did not highlight text selections by default. You had to slum it with no visual aid at all: all you had was your mark and point. Sounds bad, but… actually it’s not that big a deal. You generally know where you started your marking and it runs to your point.Transient-mark-mode (obviously enabled by default… nowadays…) made it so you can see your region selection. However… it did break some useful features in weird ways. When you do M- sigil to indicate from/to. You could edit the whole string and move stuff around, and now they’ve just added a nice shortcut to make it even easier.New commands for filling text using semantic linefeeds.The new command 'fill-paragraph-semlf' fills a paragraph of text using"semantic linefeeds", where a newline is inserted after every sentence.The new command 'fill-region-as-paragraph-semlf' fills a region of textusing semantic linefeeds, as if the region were a single paragraph. Youcan set the variable 'fill-region-as-paragraph-function' to the value'fill-region-as-paragraph-semlf' to make commands like 'fill-paragraph'and 'fill-region' fill text using semantic linefeeds.Temporary files are named differently when 'file-precious-flag' is set.When the user option 'file-precious-flag' is set to a non-nil value,Emacs now names the temporary file it creates while saving buffers usingthe original file name with ".tmp" appended. Thus, if saving the bufferfails for some reason, and the temporary file is not renamed back to theoriginal file's name, and you can easily identify which file's savingfailed.'C-u C-x .' clears the fill prefix.You can now use 'C-u C-x .' to clear the fill prefix, similarly to howyou could already use 'C-u C-x C-n' to clear the goal column.Fill prefix C-x . looks at where your point is on a line and designates everything from point to the beginning of the line as the fill prefix. When you type M-q on a long paragraph it’ll reflow it and insert the fill prefix for each new line. Use cases include prefixing email paragraphs with > or what have you.Now you can reset it without having to move point to the bol.New prefix argument for 'C-/' in Dired and Proced modes.The Dired and Proced major modes bind mode-specific undo commands to thesame keys to which 'undo' is globally bound, 'C-/', 'C-_' and 'C-x u'.These commands did not previously accept a prefix argument.Now a numeric prefix argument specifies a repeat count, just like italready did for 'undo'.New minor mode 'center-line-mode'.This mode keeps modified lines centered horizontally according to thevalue of 'fill-column', by calling 'center-line' on each non-empty lineof the modified region.New command 'unfill-paragraph'.This is the inverse of 'M-q' ('fill-paragraph').I am pretty sure org mode or something has had this for millennia buried in its codebase somewhere. But yeah, nice I guess.Changes in Specialized Modes and Packages in Emacs 31.1ProjectProject is Emacs’s latest project management suite in a long line of project suites that ship with Emacs already. It’s nice, you should use it.New command 'project-root-find-file'.It is equivalent to running 'project-any-command' with 'find-file'.New command 'project-customize-dirlocals'.It is equivalent to running 'project-any-command' with'customize-dirlocals'.Improved prompt for 'project-switch-project'.The prompt now displays the project on which to invoke a command.'project-prompter' values may be called with up to three arguments.These allow callers of the value of 'project-prompter' to specify aprompt string; prompt the user to choose between a subset of all theknown projects; and disallow returning arbitrary directories.See the docstring of 'project-prompter' for a full specification ofthese new optional arguments.'project-current' has a new optional argument, MAYBE-PROMPT.If 'project-current' is called with this argument non-nil, then it ispassed to the 'project-prompter' to use as a prompt string.Callers can use this to indicate the reason for which or context inwhich Emacs should ask the user to select a project.New command 'project-find-matching-buffer'.It can be used when switching between projects with similar file trees(such as Git worktrees of the same repository). It supports beinginvoked standalone or from the 'project-switch-commands' dispatch menu.See also the 'C-x v w w' ('vc-switch-working-tree') command, below.That is a nice bit of symmetry. I usually switch between worktrees in magit with % g, but I am happy to see project gaining some form of generic support for this concept.New variable 'project-find-matching-buffer-function'.Major modes can set this to major mode-specific functions to control how'project-find-matching-buffer' finds matching buffers.New user option 'project-list-exclude'.This user option describes projects that should always be skipped by'project-remember-project'.New user option 'project-prune-zombie-projects'.This user option controls the automatic deletion of projects from'project-list-file', when prompting for a project, that cannot beaccessed. The value must be an alist where each element is of theform: (WHEN . PREDICATE)where WHEN specifies where the deletion will be performed, and PREDICATEis a function which takes one argument, and must return non-nil if theproject should be removed.New command 'project-save-some-buffers' bound to 'C-x p C-x s'.This is like 'C-x s', but only for this project's buffers.'project-remember-project' is now interactive.'project-shell' and 'project-eshell' support numeric prefix buffer naming.They now accept numeric prefix arguments to select or create numberedshell sessions. For example, 'C-2 C-x p s' switches to or creates abuffer named "*name-of-project-shell*". By comparison, a plainuniversal argument as in 'C-u C-x p s' always creates a new session.'project-switch-to-buffer' re-uniquifies buffer names while prompting.When 'uniquify-buffer-name-style' is non-nil, 'project-switch-to-buffer'changes the buffer names to only make them unique within the givenproject, during completion. That makes some items shorter.'project-switch-to-buffer' uses 'project-buffer' as completion category.The category defaults are the same as for 'buffer', but any usercustomizations need to be re-added.'project-mode-line' can now show the project name only for local files.If the value of 'project-mode-line' is 'non-remote', project name andthe Project menu will be shown on the mode line only for projects withlocal files.One common source of performance problems in people’s riced Emacs configs is the mode line, believe it or not. It gets re-rendered more often than you think, and a lot of people cram expensive junk into it that require a file system round-trip. Fine when you’re just looking at stuff on your macbook. But over TRAMP? It’ll kill your performance.The VC-aware project backend caches the current project and its name.The duration for which the values are cached depends on whether it iscalled from a 'non-essential' context, and is determined by the variables'project-vc-cache-timeout' and 'project-vc-non-essential-cache-timeout'.Network Security Manager (NSM)NSM warns about TLS 1.1 by default.It has been deprecated by RFC 8996, published in 2021.NSM warns about DHE and RSA key exchange by default.Emacs now warns about ephemeral Diffie-Hellman key exchange, and staticRSA key exchange, also when 'network-security-level' is customized toits default 'medium' value.EtagsCtags, Etags, etc. are all a family of source code indexers that pull out semantically important stuff like function names and their precise locationNew command-line options for handling unrecognized programming languages.The new command-line option '--no-fallback-lang' disables attempts toparse as Fortran or C/C++ files whose programming language 'etags' couldnot determine. This allows avoiding false positives and reduces thetime required to scan directories with many such files. Another newoption '--no-empty-file-entries' disables generation of file entries intags tables for files in which no tags were found.Delete Selection modeNew face 'delete-selection-replacement' for the replacement text.This comes with a change to how we track what is considered "thereplacement text", which should be more robust, and is made more clearby the highlighting.Editorconfig'editorconfig-apply' is declared obsolete.You can now use 'editorconfig-display-current-properties' without havingto call 'editorconfig-apply'.Auth SourceAuth source is Emacs’s declarative secret store wrapper. I’ve written about it: Keeping Secrets in Emacs with GnuPG and Auth SourcesNon-existing or empty files in 'auth-sources' are ignored.File-based data stores are ignored in 'auth-sources' if the underlyingdata file does not exist. This is relevant if a new secret is stored insuch a file; the first usable entry of 'auth-sources' is selected as thetarget file. If you want files that do not exist to also be selected,customize the user option 'auth-source-ignore-non-existing-file' to nil.'auth-sources' set to nil means use only the password cache.AutoinsertAutoinsert – not to be confused with Skeletons, Abbrev, Tempo, etc. – is used to insert text templates when you create new files that match certain file patterns.New condition for 'auto-insert-alist'.'auto-insert-alist' can now contain predicates taking no argument asconditions. These types of conditions should be declared with'(predicate FUNCTION)'. This allows triggering 'auto-insert' withfiner-grained control.RegisterRegisters are ephemeral stores of text snippets, window/frame configurations, point locations and much more. They’re designed for fast keyboard access and I use them all the time, especially with keyboard macros.New commands 'buffer-to-register' and 'file-to-register'.These allow users to interactively store files and buffers in registers.Killed buffers stored in a register using 'buffer-to-register' areautomatically converted to a file-query value if the buffer was visitinga file.So a bit like bookmarks I guess, which are permanent stores of references to files, info manual locations and much more.The "*Register Preview*" buffer shows only suitable registers.That was already the case for the "fancy" UI but is now also true inthe default UI you get, i.e., when 'register-use-preview' is 'traditional'.The "*Register Preview*" buffer shows sorted items.Tree-sitterTree-sitter is a fancy parsing suite for structured text like code, markdown and so on. I have written an ungodly amount about tree-sitter and also code that interacts with tree-sitter.See How to Get Started with Tree-Sitter, Combobulate: Structured Movement and Editing with Tree-Sitter, etc. etc. etc.New user option 'treesit-enabled-modes'.You can customize it either to t to enable all availabletree-sitter-based modes, or to select a list of tree-sitter-based modesto enable. Depending on your customization, it modifies the variable'major-mode-remap-alist' from the corresponding variable'treesit-major-mode-remap-alist' prepared by tree-sitter-based modepackages.I’ve long complained about the remap system and the fact that tree-sitter modes are often just bare bones reimplementations of their original, non-TS-enabled cousins. But configuring the remap alist was a hassle for beginners so I am happy to see some movement here towards simplifying it.New user option 'treesit-auto-install-grammar'.It controls the automatic installation of tree-sitter grammar librariesneeded for tree-sitter-based modes, if these grammar libraries are notavailable when such modes are turned on.About time. Having to lug around dozens of complex git refs to the right, magic version of a tree-sitter library was positively terrible UX for everyone.Tree-sitter adoption is a tiny fraction of what it should be because of the decision to refuse to keep text strings to github release tags that match precisely what each major mode needs to work.You see, the poindexters who build tree-sitter the library and the grammars break compatibility all. the. time. So you can’t just pull a new version and expect stuff to work — it will NOT.This is a good thing indeed. But it’s taken several years and what I imagine are a large amount of reported user bugs for this change to take place.'treesit-extra-load-path' is now a customizable user option.The first directory in the list is used as the default directoryto install the language grammar when 'treesit-auto-install-grammar'is 'ask', 'ask-dir' or 'always'.'treesit-language-source-alist' supports keywords.The language and URL are mandatory, but remaining data can use keywords like (json "https://github.com/tree-sitter/tree-sitter-json" :commit "4d770d3")The file treesit-x.el defines a number of simple tree-sitter modes.Using the new macro 'define-treesit-generic-mode', generic modes aredefined including, but not limited to, 'gitattributes-generic-ts-mode'.Visiting a file in such mode asks for confirmation before installingits tree-sitter grammar. Then it highlights the visited fileaccording to the syntax defined by the grammar.Excellent. We already have define-generic-mode in generic.el for quickly throwing a major mode together for simple file formats. Here we can leverage the .scm files tree-sitter grammars often ship with that provide out of the box suggestions for syntax highlighting. Honestly our system in Emacs is way better but… someone has to Write a Tree-Sitter Major Mode first properly to do it the right way. So this is a nice compromiseIndirect buffers can have their own parser list.Before, indirect buffers share their base buffer's parser list andparsers. Now they can have their own parser list.Useful; but I have long complained about the complex and inadequate treatment of multiple parsers in the same buffer. No, the range system is not good enough for complex cases as it depends on queries to work. This won’t help with that, but it’ll help with out-of-buffer rendering which is something.New variable 'treesit-language-remap-alist'.This variable allows a user to remap one language into another, suchthat creating a parser for language A actually creates a parser forlanguage B. By extension, any font-lock rules or indentation rules forlanguage A will be applied to language B instead.This is useful for reusing font-lock rules and indentation rules oflanguage A for language B when language B is a strict superset oflanguage A.New accessor functions for each setting in 'treesit-font-lock-settings'.Now you can access a setting's query, feature, enable flag, and overrideflag by 'treesit-font-lock-setting-query','treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',and 'treesit-font-lock-setting-override'.New tree-sitter thing 'list'.Unlike the existing thing 'sexp' that includes both lists and atoms,'list' makes only lists be navigated by 'forward-sexp'.The new command 'treesit-forward-sexp-list' uses 'list'to move across lists. But to move across atoms inside the listit uses 'forward-sexp-default-function'.New tree-sitter based functions for moving by lists.If a major mode defines 'list' in 'treesit-thing-settings',tree-sitter setup for these modes sets 'forward-list-function' to'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and'down-list-function' to 'treesit-down-list'. This enables the'forward-list', 'up-list', and 'down-list' motion commands for thosemodes.New command 'treesit-cycle-sexp-thing'.It cycles the type of navigation for commands that move across sexp'sand lists, such as 'treesit-forward-sexp', 'treesit-forward-list','treesit-down-list', and 'treesit-up-list'. The type can be either'list', the default, or 'sexp'.With the default 'list' type, these commands move using syntax tables forsymbols and using the thing 'list' for lists.With the 'sexp' type, these commands move across nodes defined bythe tree-sitter thing 'sexp' in 'treesit-thing-settings'.So these changes are good in the sense that it is a marked improvement over the status quo before. Basically all the -sexp movement and editing commands were totally broken in TS-enabled modes because they had a really naive understanding of how -sexp commands work in basic Emacs that meant they didn’t do what you’d think they’d do in a tree-sitter-enabled major mode.It’s not perfect (it never will be with a heuristic) but it’s better. See Combobulate: Structured Movement and Editing with Tree-Sitter for why.Tree-sitter enabled modes now properly support 'show-paren-mode'.They do that by letting 'show-paren-mode' use the results of parsing bythe tree-sitter library. The new function 'treesit-show-paren-data' isused to communicate the tree-sitter parsing results to 'show-paren-mode'.Excellent.Tree-sitter enabled modes now properly support 'hs-minor-mode'.All commands from hideshow.el can selectively display blocksdefined by the new tree-sitter thing 'list'.New tree-sitter thing 'comment'.The new variable 'forward-comment-function' is set to the new function'treesit-forward-comment' if a major mode defines the thing 'comment'.New function 'treesit-query-eagerly-compiled-p'.This function returns non-nil if a query was eagerly compiled.New function 'treesit-query-source'.This function returns the string or sexp source query of a compiled query.New function 'treesit-language-display-name'.This new function returns the display name of a language given thelanguage symbol. For example, 'cpp' is translated to "C++". A newvariable 'treesit-language-display-name-alist' holds the translations oflanguage symbols where that translation is not trivial.New function 'treesit-merge-font-lock-feature-list'.This function merges two tree-sitter font-lock feature lists. Itreturns a new font-lock feature list with no duplicates at the samelevel. It can be used to merge font-lock feature lists in amulti-language major mode.Another complaint of mine was that mode authors would hoard their tree-sitter font lock queries that you use to font lock a file. It means a major mode author can’t go “but I can have CSS and Ruby in this file” and then just pull the font lock queries from a variable from those major modes — it was not possible without introspecting a loaded buffer of each MM you wanted, which was… not great.This merge feature does not solve that underlying problem but it does acknowledge at least that there are people out there building derivative modes that use multiple tree-sitter grammars. I mean, that’s the whole point of TS!New function 'treesit-replace-font-lock-feature-settings'.Given two tree-sitter font-lock settings, it replaces the feature in thesecond font-lock settings with the same feature in the first font-locksettings. In a multi-language major mode it is sometimes necessary toreplace features from one of the major modes with others that arebetter suited to the new multilingual context.Yes, quite.New variable 'treesit-aggregated-simple-imenu-settings'.This variable allows major modes to setup Imenu for multiple languages.New variable 'treesit-aggregated-outline-predicate'.This variable allows major modes to setup 'outline-minor-mode'for multiple languages.New function 'treesit-simple-indent-add-rules'.This new function makes it easier to customize indent rules fortree-sitter modes.I’m sure this is just wrapper around features already present in Stefan Monnier’s excellent SMIE (Simple-Minded Indentation Engine) that TS major modes typically use by default.New function 'treesit-simple-indent-modify-rules'.Given two tree-sitter indent rules, it replaces, adds, or prepends rulesin the old rules with new ones, then returns the modified rules. In amulti-language major mode it is sometimes necessary to modify rules fromone of the major modes to better suit the new multilingual context.New variable 'treesit-simple-indent-override-rules'.Users can customize this variable to add simple custom indentation rulesfor tree-sitter major modes.New variable 'treesit-languages-require-line-column-tracking'.Now Emacs can optionally track line and column numbers for buffer editsand send that information to tree-sitter parsers. Parsers of languagesin this list will receive line and column information. This is onlyneeded for very few languages. So far only Haskell is known to need it.New function 'treesit-tracking-line-column-p'.New function to check if a buffer is tracking line and column for bufferedits.New function 'treesit-parser-tracking-line-column-p'.New function to check if a parser is receiving line and columninformation.'treesit-language-at-point-function' is now optional.Multi-language major modes can rely on the default return value from'treesit-language-at' that uses the new function 'treesit-parsers-at'.New function 'treesit-query-with-optional'.When used in 'treesit-font-lock-rules', 'treesit-query-with-optional'returns a default query plus the valid queries from a list of optionalqueries.New function 'treesit-query-with-fallback'.When used in 'treesit-font-lock-rules', 'treesit-query-with-fallback'selects the first valid query from a list.Tree-sitter thing functions now work better with multiple parsers.The following functions now better handle the case when there aremultiple parsers at point: 'treesit-thing-prev', 'treesit-thing-next','treesit-navigate-thing', 'treesit-thing-at'. When there are multipleparsers at point, instead of using whatever 'treesit-node-at' returns atpoint, these functions now try every relevant parser in descending orderof relevance. (Deeper-embedded parsers have higher relevance.) Thesefunctions now also take an additional optional argument, PARSER, thatallows the caller to specify a parser or language to use. That alsomeans 'treesit-beginning/end-of-defun' can now move across parsers.Good. Multi-language parsing in a buffer is still not great but we’re slowly getting there.New command 'treesit-explore'.This command replaces 'treesit-explore-mode'. It turns on'treesit-explore-mode' if it is not on, and pops up the explorer bufferif it is already on.'treesit-explore-mode' now supports local parsers.Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parserrather than a language, and it is now possible to select a local parserat point to explore.I could never get these things to behave properly. They’d leave weird minor mode detritus in the calling buffer; stick around and get reactivated when a desktop file is read on startup. I’m hoping that is fixed also.Tree-sitter query predicates ':equal', ':match', and ':pred' are deprecated.Use ':eq?', ':match?', and ':pred?' instead. The change is becausenewer tree-sitter libraries mandate query predicates to end with aquestion mark. Emacs will transparently convert ':equal', ':match', and':pred' to ':eq?', ':match?', and ':pred?', respectively, so existingqueries still work fine with the latest tree-sitter library. Thepredicate ':equal' is changed to ':eq?' to better follow tree-sitter'sconvention. Also, the ':match?' predicate can now take the regexp aseither the first or second argument, so it works with both tree-sitterconvention (regexp arg second) and Emacs convention (regexp arg first).I don’t understand why this change couldn’t have been handled purely in the backend. It is not possible to talk to the actual tree-sitter library itself; it’s gated behind treesit.el and Emacs core. I do not understand why the backend couldn’t just rewrite these query matchers and just leave it at that. Why deprecate?Track changesNew variable 'track-changes-undo-only' to distinguish undo changes.HideshowHideshow is Emacs’s code/structured text hiding system.New command 'hs-cycle'.This command cycles the visibility state of the current block betweenhiding the parent block, hiding only the nested blocks and showing allthe blocks.New user option 'hs-cycle-filter' for visibility-cycling with 'TAB'.This user option controls the positions on the headline of hideable blockswhere the 'TAB' key cycles the blocks' visibility.New command 'hs-toggle-all'.This command hides or shows all the blocks in the current buffer.'hs-hide-level' no longer hides all the blocks in the current buffer.If 'hs-hide-level' was not inside a code block, it would hide all theblocks in the buffer like 'hs-hide-all'. Now it only hides all thesecond level blocks.New user option 'hs-display-lines-hidden'.If this option is non-nil, Hideshow displays the number of hidden linesnext to the ellipsis. By default this is disabled.New user option 'hs-show-indicators'.This user option determines if Hideshow should display indicators toshow and toggle the block hiding. If non-nil, the indicators are enabled.By default this is disabled.New user option 'hs-indicator-maximum-buffer-size'.This user option limits the display of Hideshow indicators to buffersthat are not too large. By default, buffers larger than 2MB have theindicators disabled; a value of nil will activate the indicatorsregardless of the buffer size.New user option 'hs-indicator-type'.This user option determines which indicator type should be used for theblock indicators.The possible values are: 'fringe' to display the indicators in thefringe (the default); 'margin' to display the indicators in the margin;and nil, to display the indicators at end-of-line.The new icons 'hs-indicator-show' and 'hs-indicator-hide' can be used tocustomize the indicators appearance, but apply only if'hs-indicator-type' is set to 'margin' or nil.The hiding behavior of some hideshow commands has changed.'hs-hide-block', 'hs-hide-level', 'hs-cycle' and 'hs-toggle-hiding' nowhide the innermost block to which the current line belongs instead ofthe block after point. To restore the old behavior, set the new useroption 'hs-hide-block-behavior' to 'after-point'.The variable 'hs-special-modes-alist' is now obsolete.Instead of customizing Hideshow for a mode by setting the elements of'hs-special-modes-alist', such as START, COMMENT-START,FORWARD-SEXP-FUNC, etc., major mode authors should set the correspondingbuffer-local variables 'hs-block-start-regexp', 'hs-c-start-regexp','hs-forward-sexp-function', etc.'hs-hide-level' can now hide comments too.This is controlled by 'hs-hide-comments-when-hiding-all'.New minor mode 'hs-indentation-mode'.This buffer-local minor mode configures 'hs-indentation-mode' to detectblocks based on indentation.The new user option 'hs-indentation-respect-end-block' can be used toadjust the hiding range for this minor mode.That is truly useful. Particularly for YAML.C-ts modeThis and any future mode with -ts in it, is specifically for the tree-sitter-flavored version of a major mode. Do note that with few exceptions, the TS major modes are usually far less feature rich than the major modes they try to replace.New user option 'c-ts-mode-enable-doxygen'.By default, this is nil, and the Doxygen comment blocks in C/C++ sourcesare highlighted like other comments. When non-nil, Doxygen commentblocks are font locked if the Doxygen grammar library is available.Csharp-ts modeRenamed feature in 'treesit-font-lock-feature-list'.The feature 'property' has been renamed to 'attribute', since this iswhat it is generally called among C# programmers.Go-ts modeNew unit test commands.Three new commands are now available to run unit tests.The 'go-ts-mode-test-function-at-point' command runs the unit test atpoint. If a region is active, it runs all the unit tests under theregion. It is bound to 'C-c C-t t' in 'go-ts-mode'.The 'go-ts-mode-test-this-file' command runs all unit tests in the currentfile. It is bound to 'C-c C-t f' in 'go-ts-mode'.The 'go-ts-mode-test-this-package' command runs all unit tests under thepackage of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'.The 'go-ts-mode-build-tags' user option is available to set a list ofbuild tags for the test commands.The 'go-ts-mode-test-flags' user option is available to set a list ofadditional flags to pass to the go test command line.Lua-ts modeNew user option 'lua-ts-auto-close-block-comments'.When non-nil, inserting a block comment "--[[" will close it byinserting its respective "]]". By default, this is disabled.Java-ts modeNew user option 'java-ts-mode-enable-doxygen'.By default, this is nil, and the Doxygen comment blocks in Java sourcesare highlighted like other comments. When non-nil, Doxygen commentblocks are font locked if the Doxygen grammar library is available.New user option 'java-ts-method-chaining-indent-offset'.Now method chaining is indented by 8 spaces rather than 4, and thisoption controls how much is indented for method chaining.JSON-ts modeNew command 'json-ts-jq-path-at-point'.This command copies the path of the JSON element at point to thekill-ring, but formatted for use with the 'jq' utility.Now that is handy. One of the actual benefits of tree-sitter’s concrete syntax tree.PHP-ts mode'php-ts-mode' now depends on 'mhtml-ts-mode'.The direct dependency on 'js-ts-mode', 'css-ts-mode' and 'html-ts-mode'has now been replaced by 'mhtml-ts-mode'. Navigation, Outline and Imenuwork for all languages, and code maintenance is easier.'php-ts-mode-run-php-webserver' can now accept a custom "php.ini" file.You can use the new optional argument CONFIG when calling'php-ts-mode-run-php-webserver' to pass an alternative "php.ini" file tothe built-in Web server. Interactively, when invoked with a prefixargument, 'php-ts-mode-run-php-webserver' prompts for the config file aswell as for other connection parameters.The user option 'php-ts-mode-css-fontify-colors' has been removed.'mhtml-ts-mode-css-fontify-colors' replaces this option.New user option 'php-ts-mode-html-relative-indent'.In buffers containing both PHP and HTML, this option allows you todefine how the PHP code should be indented relative to the position ofthe HTML tags.New user option 'php-ts-mode-html-indent-offset'.Offset of PHP code block relative to HTML tags.New user option 'php-ts-mode-find-sibling-rules'.Rules for finding siblings of a PHP file.New user option 'php-ts-mode-phpdoc-highlight-errors'.When non-nil, it highlights unknown PHPDOC tags using'font-lock-warning-face' so that the user can identify them more easily.New command 'php-ts-mode-show-ini'.Show the location of the PHP ini files. If the current buffer isassociated to a remote PHP file, show the remote PHP ini files.Rust-ts modeNew user option 'rust-ts-mode-fontify-number-suffix-as-type'.Rust number literals may have an optional type suffix. When this optionis non-nil, this suffix is fontified using 'font-lock-type-face'.YAML-ts modeNew user option 'yaml-ts-mode-yamllint-options'.Additional options for 'yamllint', the command used for Flymake's YAMLsupport.EIEIOEIEIO is Emacs’s CLOS-style Object-Oriented Programming system. Named after the nursery rhyme “Old McDonald had a farm… EIEIO”.Good ole’ Ludlam who wrote it had a thing for farm-related naming. See also his “Semantic Bovinator”, a tree-sitter precursor from the 2000s.New value 'warn' for 'eieio-backward-compatibility'.This is the new default value and causes warnings to be emittedat run-time for the use of the associated deprecated features.'(setq eieio-backward-compatibility t)' can be used to recoverthe previous silence.Text modeNew commands to convert between ASCII and full-width characters.New commands 'fullwidth-region' and 'fullwidth-word' convert ASCIIcharacters in region or in the word at point to the correspondingfull-width characters, which are customarily used instead of ASCIIcharacters in CJK texts. For example, 'A' is converted to 'A', '1' isconverted to '1', etc. Companion commands 'halfwidth-region' and'halfwidth-word' perform the opposite conversion.Texinfo modeTexinfo mode now can auto-close the ``'' pairs.Now inserting `` in 'texinfo-mode' will close it by inserting itsrespective '', if 'electric-pair-mode' is enabled.ASM mode'asm-mode-set-comment-hook' is obsolete.You can now set 'asm-comment-char' from 'asm-mode-hook' instead.IbufferIBuffer is a fantastic and superior buffer list manager in Emacs. Do try it out and look around online for cool configs for it.New column 'recency' in Ibuffer display.The user option 'ibuffer-formats' configures the Ibuffer formats. Add'recency' to the format to display the column.New value 'title' for the user option 'ibuffer-use-header-line'.Display column titles in the header line if 'ibuffer-use-header-line' isset to 'title'.New user option 'ibuffer-human-readable-size'.When non-nil, buffer sizes are shown in human readable format.'define-ibuffer-op' prompts can now be functions.The prompts 'opstring' and 'active-opstring' can now either be stringsor functions. This is useful when your prompts can benefit from dynamiccontent.New Ibuffer-dedicated faces.New faces 'ibuffer-marked', 'ibuffer-deletion', 'ibuffer-title', and'ibuffer-filter-group-name'. By default, they inherit from thegeneral-purpose faces Ibuffer previously used, to preserve previousbehavior.ElDocEldoc is Emacs’s interactive, point-driven documentation and code lookup tool. See Seamlessly Merge Multiple Documentation Sources with Eldoc for more information.New ElDoc function 'elisp-eldoc-funcall-with-docstring'.This function includes the current function's docstring in the ElDocecho area and can be used as a more detailed alternative to'elisp-eldoc-funcall'.New user option 'elisp-eldoc-funcall-with-docstring-length'.This user option specifies how long function docstrings must bedisplayed in 'elisp-eldoc-funcall-with-docstring'. If set to 'short'(the default), only display the first sentence of the docstring.Otherwise, if set to 'full', display the full docstring.New user option 'elisp-eldoc-docstring-length-limit'.This user option controls the maximum length of docstrings in characterunits that 'elisp-eldoc-funcall-with-docstring' and'elisp-eldoc-var-docstring-with-value' will show. By default, it is setto 1000 characters.Buffer MenuThe default buffer list manager bound to C-x C-b. Replace it with M-x ibuffer.New user option 'Buffer-menu-human-readable-sizes'.When non-nil, buffer sizes are shown in human readable format. Thedefault is nil, which retains the old format.TermEmacs’s terminal emulator. See Running Shells and Terminal Emulators in EmacsThe terminal emulator now supports auto-margins control.Term mode now handles DECAWM escape sequences that control whether textautomatically wraps at the right margin:- \e[?7h enables auto-margins (default)- \e[?7l disables auto-marginsWhen auto-margins is disabled, characters that would go beyond the rightmargin are discarded, which matches the behavior of physical terminalsand other terminal emulators. Control sequences and escape sequencesare still processed correctly regardless of margin position.SMerge modeSMerge is one of several conflicting (pardon the pun) ways of handling merge conflicts in Emacs. I like it.New 'repeat-map' for SMerge conflict resolution commands.With 'repeat-mode' enabled, after invoking an SMerge command (forexample, 'C-c ^ n'), you can repeat further SMerge commands by typingjust the final key (for example, 'n', 'p', 'u', 'l').Oh gosh yes. I love SMerge but C-c ^ n (and friends) is exactly why people who are not Emacs users bounce hard when they see a key binding like that.New command 'smerge-extend' extends a conflict over surrounding lines.New command 'smerge-refine-exchange-point' to jump to the other side.When used inside a refined chunk, it jumps to the matching position inthe other side of the refinement: if you are in the new text, it jumpsto the corresponding position in the old text and vice versa.New user option 'smerge-refine-shadow-cursor'.When 'smerge-refine' shows the conflict diffs at word granularity, ashadow cursor is now displayed in the lower version when point is in theupper version, and vice versa. The shadow cursor is just the charactercorresponding to the position where 'smerge-refine-exchange-point' wouldjump, shown in a new distinct face 'smerge-refine-shadow-cursor', bydefault a box face.'smerge-refine-regions' can compare regions in different buffers.Cursor Sensor modeNow here’s an obscure mode. It and the intangible cursor concept are basically just a way of taking clumps of characters and telling Emacs that it should, and I’m keeping it a bit simple here, treat them as one big cohesive unit for all intents. I have only ever used an intangible cursor property once and that was in Combobulate’s envelope system.New direction 'moved' used when the cursor moved within the active area.Image DiredYep, Emacs’s dired has a thumbnail image viewer system.'image-dired-show-all-from-dir' takes the same first argument as 'dired'.This allows passing a string with wildcards, or a cons cell where thefirst element is a list and the rest is a list of files.New single-letter bindings in 'image-dired-thumbnail-mode-map'.The keys 'f', 'b', 'n', 'p', 'a' and 'e' are now bound to the samecommands as their 'C-' counterparts.Browse URLBrowse URL is just a wide-ranging set of internal functions, user-facing commands and variables that govern how Emacs pass URL-related information in and out; stuff like opening a browser when you click an url.New user option 'browse-url-transform-alist'.This user option is an alist that allows transforming URLs before askinga web browser to load them. For example, it could be used like this: (add-to-list 'browse-url-transform-alist '("vim\\.org/.*" . "gnu.org/software/emacs/"))New command 'browse-url-qutebrowser' for Qutebrowser.For better integration with Qutebrowser, set'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'.New GTK-native launch mode.For better Wayland support, the pgtk toolkit exposes a new'x-gtk-launch-uri' browse-url handler and uses it by default when URLsare browsed from a PGTK frame. For other frames, we fall back to thedefault URL launch function. This change allows us to properly raisebrowser windows under Wayland using the xdg_activation_v1 protocol.'RET' can visit URLs in read-only buffers.In some keymaps such as 'ansi-osc-hyperlink-map','browse-url-button-map', 'goto-address-highlight-keymap', and'bug-reference-map', it is now possible to visit URLs by typing just'RET' instead of 'C-c RET' in read-only buffers.Removed support for some obsolete web browsers.Conkeror (obsolete since Emacs 28.1), gnome-moz-remote (obsolete sinceEmacs 25.1), and gnudoit (obsolete since Emacs 25.1).'browse-url-firefox-program' now supports LibreWolf and Zen Browser.LibreWolf, Floorp and Zen Browser, three popular Firefox forks, have beenadded to the programs that are automatically recognizable as Firefoxworkalikes. Emacs will set 'browse-url-firefox-program' to the firstone of these found on your system.Floorp?CL-LibDerived types (i.e. 'cl-deftype') can now be used as method specializers.Some cl-lib functions and macros are now built-in.These functions or macros have been added to Emacs Lisp, and the oldnames are now aliases for the built-in equivalents:- 'cl-incf' renamed to 'incf'- 'cl-decf' renamed to 'decf'- 'cl-oddp' renamed to 'oddp'- 'cl-evenp' renamed to 'evenp'- 'cl-plusp' renamed to 'plusp'- 'cl-minusp' renamed to 'minusp'- 'cl-member-if' renamed to 'member-if''cl-member-if' is marked obsolete. The other names are deprecated too,and will be marked as obsolete in a future release.Common Lisp idioms continue advancing from the rear echelons into Emacs proper, much to the chagrin of some people.'cl-labels' now also accepts '(FUNC EXP)' bindings, like 'cl-flet'.Such bindings make it possible to compute the function to bind to FUNC.'cl-block' names are now lexically scoped, as documented.'cl-locally' is now obsolete.It is an alias for the 'progn' special-form.'cl-declare' is now obsolete; use 'defvar' instead.'cl-gensym' is now obsolete; use 'gensym' instead.New macro 'cl-with-accessors'.This macro is similar to 'with-slots', but uses accessor functionsinstead of slot names. It is useful when some slot accessor functionsare used repeatedly, such as reading from a slot and then writing tothat slot. Symbol macros are created for the accessor functions using'cl-symbol-macrolet', so they can be used with 'setq' and 'setf'.Unless I am mistaken, with-slots can already use setf to set a slot? I must be reading the text wrong.WhitespaceDon’t sleep on M-x whitespace-mode and friends for finding errant whitespaces, tabs, and so forth. You won’t need it often, but when you do…'whitespace-cleanup' now adds a missing newline at end of file.If 'whitespace-style' includes 'missing-newline-at-eof' (which is thedefault), the 'whitespace-cleanup' function will now add the newline.'whitespace-mode' can now prettify page delimiter characters ('^L').If 'page-delimiters' is set in 'whitespace-style', or the new minor mode'whitespace-page-delimiters-mode' is on, the page delimiter character('^L') is displayed as a pretty horizontal line that spans the entirewidth of the window. The new 'whitespace-page-delimiter' face can beused to customize the appearance.New user option 'whitespace-global-mode-buffers'.Normally, 'global-whitespace-mode' skips special buffers whose namestarts with an asterisk "*". This user option provides an override: itcontains a list of regular expressions used to match the names ofspecial buffers in which 'global-whitespace-mode' should turn on. Thedefault value preserves the existing exception for the "*scratch*"buffer.BookmarkOne of Emacs’s greatest features. The bookmark system. You can bookmark a wide range of things and Emacs will happily pop open that exact spot in the info manual you bookmarked. Low-key fantastic feature.Bookmark history now saves each bookmark only once.Previously, the variable 'bookmark-history' accumulated duplicatebookmark names when bookmark features were used interactively. Thismade their history larger than necessary for frequent bookmark users.Bookmark names are now saved uniquely.New user option 'bookmark-bmenu-type-column-width'.This user option controls the width of the type column on the bookmarkmenu 'bookmark-bmenu-list'. The default value is 8 which is backwardscompatible.New hook 'bookmark-after-load-file-hook'.This hook is run by 'bookmark-load' after loading a bookmark file. Thishook can be used, for example, to reconcile 'bookmark-alist' againstbookmark state that you, or a package that you use, maintains.RecentfA store of recent files. Back in the day it was a bit of a pain to use due to the way completion mechanism worked, so I wrote Find files faster with the recent files package. Nowadays your fancy completion package + M-x recentf is all you needYou can now regularly auto-save recently opened files.Customize user option 'recentf-autosave-interval' to the number ofseconds between auto saving recently opened files. For example,customize this variable to 300 to save recently opened files every 5minutes. From Lisp, use 'setopt', not 'setq'. If'recentf-autosave-interval' is nil, auto saving is disabled; this is thedefault.New user option 'recentf-show-messages'.'recentf-save-list' can print a message when saving the recentf list.The new option, if customized to nil, suppresses this message.New user option 'recentf-suppress-open-file-help'.By default, invoking 'recentf-open-files' displays a message saying whataction clicking or typing 'RET' on the item at point executes, and tabbingbetween items in the "*Open Recent*" buffer likewise displays suchmessages. To suppress these messages, customize the user option'recentf-suppress-open-file-help' to non-nil. The default value of thisoption is nil.New user option 'recentf-exclude-ignored-extensions'.Add the new predicate function 'recentf-exclude-file-by-extension-p' tothe list that is the value of the user option 'recentf-exclude' toignore files with certain extensions. By default, adding this functionto 'recentf-exclude' ignores files whose extensions are listed in'completion-ignored-extensions'; you can specify a different list ofextensions by customizing the new user option'recentf-exclude-ignored-extensions'.SaveplaceM-x save-place-mode stores the exact place you were in a file when you revisit it.You can now regularly auto-save places.Customize user option 'save-place-autosave-interval' to the number ofseconds between auto-saving places. For example, customize thisvariable to 300 to save places every 5 minutes. From Lisp, use 'setopt',not 'setq'. If 'save-place-autosave-interval' is nil, auto saving isdisabled; this is the default.SavehistTired of losing history in all manner of completion prompts? Enable M-x savehist-mode and you can choose what and where is saved.The history file can be modified by external tools.Emacs can now handle this case gracefully by merging the external andinternal history information. This feature is activated only when'savehist-additional-variables' is nil.Savehist no longer saves additional variables more than once.If you configured 'savehist-additional-variables' with variables thatwere also dynamically accumulated in minibuffer history duringminibuffer use, they are now saved only once in the file specified by'savehist-file'. Previously, they were saved twice.Rectangle MarkBorrowed from CUA-mode that for some reason got special rectangle selection but the rest of us non-CUA users did not. It was moved out some years ago and nowC-x SPC activates it.New user option to control whether empty rectangle selections are shown.The new user option 'rectangle-indicate-zero-width-rectangle' can beused to disable the default display of empty rectangular selections.The default is t; set it to nil to disable the indication. (It causes ahorizontal shift of text on display, which could be distracting.)MessageOne of several ways of crafting RFC-compliant e-mails in Emacs."In-Reply-To" header contains only a message id.The "In-Reply-To" header created when replying to a message now containsonly the originating message's id, conforming to RFC 5322. The previousbehavior included additional information about the originating message.The new user option 'message-header-use-obsolete-in-reply-to', nil bydefault, can be set to a non-nil value to restore the previous behavior.Or should I say: compliant now?'message-subject-re-regexp' default value is derived from 'mail-re-regexps'.'mail-re-regexps' is a new user option that is easier to customize than'message-subject-re-regexp'. 'message-subject-re-regexp' is stillhonored if it was already set.'message-strip-subject-re' now matches case-insensitively.'message-change-subject' inserts the current subject into future history.Hashcash support has been removed.It is believed to no longer be useful as a method to fight spam. The'message-generate-hashcash' option is now obsolete and has no effect.GnusA one-man marching band that started its life as a usenet group reader. Incredibly complex and feature rich reader that, after decades of being brow-beaten with a rolled-up newspaper, can now also handle your emails, reddit chats, rss feeds and probably a lot more than that.Replying to icalendar events now supports specifying a comment.When called with a prefix argument, accepting, declining, or tentativelyaccepting an icalendar event will prompt for a comment to add to theresponse.Hashcash support has been removed.It is believed to no longer be useful as a method to fight spam. The'spam-use-hashcash' hook is now obsolete and has no effect.Add 'M-i' keybinding as the symbolic prefix in the group keymap.The symbolic prefix is another kind of universal prefix that is used inGnus; see "(gnus) Symbolic Prefixes" in the Gnus manual.Sorting selected groups is now possible with 'gnus-topic-mode'.gnus-dbus.el is now obsolete.System sleep integration is now independent of D-Bus.The system sleep integration previously provided by customizing thevariable 'gnus-dbus-close-on-sleep' is now deprecated. A new systemusing the builtin system-sleep.el library is now available by customizing'gnus-close-on-sleep'. This will work on all systems that the'system-sleep' library supports.SieveMajor mode for server-side IMAP sieve filters.New keybinding to refresh buffer in 'sieve-manage-mode'.'sieve-refresh-scriptlist' is now bound to 'g' to refresh the contentsof the current sieve buffer.ButtonEmacs’s widget system (what customize uses) is used here to turn stuff like #29382 bug reference notations into little interactive buttons.If you like this paradigm, just use Bob Weiner’s Hyperbole package. It’s far better.New function 'unbuttonize-region'.It removes all the buttons in the specified region.Disabling 'button-mode' now removes all buttons in the current buffer.ShellMy favorite method of interacting with shells. Nothing more than a riced Emacs buffer serving up cooked terminal output. See Running Shells and Terminal Emulators in EmacsShell buffers now support bookmarks.You can now bookmark local and remote shell buffers using the bookmarkmenu 'bookmark-bmenu-list', or by using the command 'bookmark-set'.Shell bookmarks can be loaded via the menu and by using the command'bookmark-jump', which opens a bookmarked shell, restores its buffer name,its current directory, and creates a remote connection, if necessary.You can customize 'shell-bookmark-name-function'.Bookmarks are awesome. I’ll have to play with this for sureNew command to complete the shell history.'comint-complete-input-ring' ('C-x ') is like 'minibuffer-complete-history'but completes on comint inputs.See my Shell & Comint Secrets: History commands'ansi-osc-directory-tracker' now respects remote directories.Remote directories are now retained when changes to 'default-directory'are detected by this filter. For example, "/ssh:hostname:/home/username"would have been stripped to just "/home/username" before.OSC directory tracking is especially important in shell mode for it does not typically ask the underlying shell for “completion”.EshellEmacs’s very own shell written in Elisp. Cool package. See Mastering Eshell.New interactive command 'eshell-clear'.This command scrolls the screen so that only the current prompt isvisible, optionally erasing all the previous input/output as well.Previously, the Eshell built-in command 'eshell/clear' supported this(e.g., to call it via 'M-x'), but this new command behaves moreconsistently if you have a partially typed command at the Eshell prompt.New user option 'eshell-command-async-buffer'.This option lets you tell 'eshell-command' how to respond if its outputbuffer is already in use by another invocation of 'eshell-command', muchlike 'async-shell-command-buffer' does for 'shell-command'. By default,this will prompt for confirmation before creating a new buffer whennecessary. To restore the previous behavior, customize this option to'confirm-kill-process'.'eshell-execute-file' is now an interactive command.Interactively, this now prompts for a script file to execute. With theprefix argument, it will also insert any output into the current bufferat point.'eshell-command' and 'eshell-execute-file' can now say where stderr goes.These functions now take an optional ERROR-TARGET argument to controlwhere to send the standard error output.See the Info node "(eshell) Entry Points" for more details.You can now loop over ranges of integers with the Eshell 'for' command.When passing a range like 'BEGIN..END' to the Eshell 'for' command,Eshell will now iterate over each integer between BEGIN and END, notincluding END.Conditional statements in Eshell now use an 'else' keyword.Eshell now prefers the following form when writing conditionals: if {conditional} {true-subcommand} else {false-subcommand}The old form (without the 'else' keyword) is retained for compatibility.You can now chain conditional statements in Eshell.When using the newly-preferred conditional form in Eshell, you can nowchain together multiple 'if'/'else' statements. For more information,see "(eshell) Control Flow" in the Eshell manual.Eshell's built-in 'wait' command now accepts a timeout.By passing '-t' or '--timeout', you can specify a maximum time to waitfor the processes to exit. Additionally, you can now wait for externalprocesses by passing their PIDs.New hook 'eshell-after-initialize-hook'.This hook runs after an Eshell session has been fully initialized,immediately before running 'eshell-post-command-hook' for the firsttime.Improved history Isearch.History Isearch in Eshell has been reworked. Two new commands'eshell-isearch-backward-regexp' and 'eshell-isearch-forward-regexp' areadded for incrementally searching through the input history.'eshell-isearch-backward-regexp' is bound to 'M-r' by default, and 'M-s'is freed for normal search commands. If you would like to restore theprevious key-bindings for the non-incremental search commands, put inyour configuration: (with-eval-after-load 'em-hist (keymap-set eshell-hist-mode-map "M-r" #'eshell-previous-matching-input) (keymap-set eshell-hist-mode-map "M-s" #'eshell-next-matching-input))Eshell was sorely missing the interactive reverse searchNew user option 'eshell-history-isearch'.When 'eshell-history-isearch' is nil (the default), Isearch commandssearch in the buffer contents. If you customize it to t, those commandsonly search in input history. If you customize it to the symbol 'dwim',those commands search in input history only when point is after the lastprompt.Eshell 'alias' command now sorts the alias list.When adding an alias interactively, Eshell now sorts the list of aliasesbefore saving the alias file. This maintains the stability of thelist of aliases to make the diff between versions more readable if youstore your aliases in version control.I’m happy somebody’s taken ownership of eshell and is busy adding cool new features.Mail UtilsNew user option 'mail-re-regexps'.This contains the list of regular expressions used to match "Re:" andinternational variants of it when modifying the Subject field inreplies.MairixMairix is apparently a mail search engine. I have never used it.'mairix-search' now keeps its own minibuffer history.Imap'imap-authenticate' can now use PLAIN authentication."AUTH=PLAIN" support is auto-enabled if the IMAP server supports it. Ifyou do not wish to use "AUTH=PLAIN", pass a specific authentication typeto 'imap-open' for 'imap-authenticate' to use, or remove 'plain' from'imap-authenticators'.RmailAnother way to author your emails in Emacs. So that’s 3 so far: Message, Gnus and Rmail.'rmail-re-abbrevs' default value is now derived from 'mail-re-regexps'.'mail-re-regexps' is a new user option that is easier to customize than'rmail-re-abbrevs'. 'rmail-re-abbrevs' is still honored if it wasalready set.New user options for formatting Rmail summary lines.'rmail-summary-sender-function' and 'rmail-summary-recipient-function'control how the sender/recipient fields are displayed in the summary.'rmail-summary-address-width' controls the width of that field.New user option 'rmail-mime-save-action'.This option specifies an action to take after saving a MIME attachment.Predefined values include visiting the file in Emacs, jumping to thefile in Dired, or opening the file with an external program. You canalso provide a custom function.Rmail now detects email messages from suspicious sender addresses.If the "From" header of a message contains a suspicious email address,Rmail will now highlight it in a distinct face and provide a 'help-echo'tooltip explaining the reason. (What exactly is considered assuspicious email addresses is determined by the function'textsec-suspicious-p', which see.) This is controlled by the new useroption 'rmail-detect-suspicious-headers', whose default value isnon-nil; customize to nil to disable the check.SendmailSending an email via sendmail.el checks for suspicious addressees.The command 'mail-send', used to send email in Mail mode, now checks theaddressees for suspicious email addresses. If such addresses are found,the command will show them and the reason they are consideredsuspicious, and will request a confirmation before sending the message.This follows the behavior of Message mode, and affects users whocustomize 'mail-user-agent' to the value 'sendmail-user-agent'.SHRSHR is Emacs’s internal HTML rendering engine. It powers M-x eww, Emacs’s Web Wowser.SHR now slices large images into rows.Sliced images allow for more intuitive scrolling up/down by letting youscroll past each slice, instead of jumping past the entire image.Previously, SHR sliced images when zoomed to their original size, nomatter how large or small that was. Now, SHR slices any images tallerthan 'shr-sliced-image-height'. For more information, see the Info node"(eww) Advanced".You can now customize the image zoom levels to cycle through.By customizing 'shr-image-zoom-levels', you can change the list of zoomlevels that SHR cycles through when calling 'shr-zoom-image'.New user option 'shr-fill-text'.When 'shr-fill-text' is non-nil (the default), SHR will fill textaccording to the width of the window. If you customize it to nil, SHRwill leave the text as-is; in that case, EWW will automatically enable'visual-line-mode' when displaying a page so that long lines arevisually wrapped at word boundaries.EWWEmacs’s Web Wowser. M-x eww. Handy little text and image browser; great for documentation.EWW now enables 'visual-wrap-prefix-mode' when 'shr-fill-text' is nil.By default, 'shr-fill-text' is t, and EWW fills the text according tothe width of the window. If you customize 'shr-fill-text' to nil, EWWwill now automatically turn on 'visual-wrap-prefix-mode' in addition to'visual-line-mode', so that long lines are wrapped at word boundariesnear the window edge, and continuation lines are indented using prefixescomputed from the surrounding context.New user option 'eww-guess-content-type-functions'.The value is a list of functions that EWW should call to determine thecontent-type of Web pages which don't have a valid 'Content-Type'header. The default value is a function that considers a page with anHTML 'doctype' declaration to have content-type "text/html".'eww-switch-to-buffer' falls back to calling 'eww'.When there is no EWW buffer, 'eww-switch-to-buffer' falls back tocalling 'eww'.URL QueueOne of several ways of querying a HTTP endpoint.'url-queue-retrieve' now makes use of some url request variables.The variables 'url-request-data', 'url-request-method', and'url-request-extra-headers' can now be bound around a call to'url-queue-retrieve'. Binding them has the same effect as for'url-retrieve'.CC modeClassic C mode.New type of 'c-offsets-alist' element.The 'cdr' of such an alist element may now be a syntactic symbol. Asource line with a syntactic element whose symbol is the 'car' of thatalist element is indented as though it were the 'cdr'.Enums now have their own syntactic symbols.The new symbols 'enum-open', 'enum-close', 'enum-intro' and'enum-entry' are used in the analysis of enum constructs. Previously,they were given 'brace-list-open', etc. These are fully described inthe "(ccmode) Enum Symbols" node of the CC mode manual.Enums are now, by default, indented like classes, not brace-lists.To get the old behavior back, add an element '(enum-open. brace-list-open)' to 'c-offsets-alist' in your CC mode style, or amend'c-offsets-alist' likewise in any of the other ways detailed in the"(ccmode) Config Basics" node of the CC mode manual.Emacs Lisp modeSemantic highlighting support for Emacs Lisp.'emacs-lisp-mode' can now use code analysis to highlight more symbolsmore accurately. Customize the new user option'elisp-fontify-semantically' to non-nil to enable this feature, and seethe Info node "(emacs) Semantic Font Lock" for more information.Awesome. Can’t wait to try it out.Checkdoc will now flag incorrect formatting in warnings.This affects calls to 'warn', 'lwarn', 'display-warning', and'message-box'.New function 'checkdoc-batch'.It checks the buffer in batch mode, prints all found errorsand signals the first found error.New file-local variable 'lisp-indent-local-overrides'.This variable can be used to locally override the indent specificationof symbols.Checkdoc no longer warns about missing footer lines in some cases.Emacs Lisp libraries have traditionally ended with a footer line(sometimes referred to as "terminating comment"). Their purpose was toeasily detect files that had been truncated in transit on ancient andless reliable connections: ;; some-cool-package.el ends here'checkdoc' will no longer warn if that line is missing for packages thatexplicitly only support Emacs 30.1 or later, as specified in the"Package-Requires" header. The reason for keeping the warning forpackages that support earlier versions of Emacs is that package.el inthose versions can't install packages where that line is missing.This change affects both 'checkdoc' and the corresponding flymakebackend.Checkdoc no longer warns about wide docstrings.The Checkdoc warning for wide docstrings duplicates the byte-compilerwarning added in Emacs 28.1. This redundancy is now removed.New user option 'checkdoc-arguments-missing-flag'.Set this to nil to disable warnings for function arguments that are notdocumented in docstrings.New user option 'checkdoc-allow-quoting-nil-and-t'.Customizing this option to a non-nil value stops checkdoc from warningfor docstrings where symbols 'nil' and 't' are in quotes.The default of 'checkdoc-verb-check-experimental-flag' is now nil.In most cases, having it enabled leads to a large amount of falsepositives.IELMIELM is the Interactive Emacs Lisp Mode. A REPL for Elisp. See Evaluating Elisp in Emacs.IELM input history is now saved also when the IELM process is killed.When you kill the IELM process with 'C-c C-c', the input history is nowsaved to the file specified by 'ielm-history-file-name', just like whenyou exit the Emacs session or kill the IELM buffer.New value 'point' for user option 'ielm-dynamic-return'.When 'ielm-dynamic-return' is set to 'point', typing 'RET' has dynamicbehavior based on whether point is inside an sexp. While point isinside an sexp typing 'RET' inserts a newline, and otherwise Emacsproceeds with evaluating the expression. This is useful when'electric-pair-mode', or a similar automatic pairing mode, is enabled.Very handy as the multi-line editing behavior in IELM is a little bit wonky. Honestly IELM is a terrible choice if you’re doing multi-line stuff; use a scratch buffer or better still an ert test.Doc ViewDoc View turns complex documents like PDF and MS word into images so Emacs can render and show them to you.Dedicated buffer for plain text contents.When switching to the plain text contents with 'doc-view-open-text',Doc View now creates a dedicated buffer to display it. 'C-c C-c' gets youback to the real Doc View buffer if it still exists.New commands to save and restore pages in buffer-local registers.Doc View can store the current page to buffer-local registers with the newcommand 'doc-view-page-to-register' (bound to 'm'), and later the storedpage can be restored with 'doc-view-jump-to-register' (bound to ''').Doc View can generate imenu indices for DjVu and ODF documents.When the 'djvused' program is available, Doc View can now generate an imenuindex for DjVu files from its outline. Indices for Open Document Format(ODF) files as used by OpenOffice and LibreOffice are generated usingthe 'mutool' program after their initial conversion to PDF format. Thename of the 'djvused' program can be customized by changing the useroption 'doc-view-djvused-program'.IspellEmacs’s spell checker. I like M-x flyspell-mode (and M-x flyspell-prog-mode for programming that just does comments and strings) as they add squiggly lines to misspellings, and of course M-$ to spell check the word at point.The default value of 'ispell-help-timeout' has changed.The default value is now 30 seconds, as the old value was too short toallow reading the help text.Ispell can now save spelling corrections as abbrevs.In the Ispell command loop, type 'C-u' immediately before selecting areplacement to toggle whether that correction will be saved as a globalabbrev expansion for its misspelling. The new user option'ispell-save-corrections-as-abbrevs' determines whether abbrev savingis enabled by default.Oh that’s awesome. My article on Correcting Typos and Misspellings with Abbrev talks about how i turned Wikipedia’s list of common misspellings into abbrevs. I use it every day, without really knowing. It just… silently corrects typos.FlyspellAs mentioned, this gives you squiggly underlines when you misspell something.New user option 'flyspell-delay-use-timer'.By default, Flyspell waits after so-called "delayed" commands by calling'sit-for'. If you customize this option to non-nil, Flyspell insteadsets up a timer to perform spell-checking after a short delay, whichallows idle timers and other code to run during this delay period. Weplan to make this behavior the default in a future Emacs release, so weinvite Flyspell users to enable this new option and report any issues.'turn-on-flyspell' and 'turn-off-flyspell' are obsolete.To unconditionally enable 'flyspell-mode' from a hook, use this instead: (add-hook 'text-mode-hook #'flyspell-mode)TrampEmacs’s system of communicating and interfacing with remote systems via Docker containers, Kubernetes, SSH, Android debug bridge and so many more. Truly one of the greatest features in Emacs.Tramp signals 'remote-file-error' in case of connection problems.This is a subcategory of 'file-error'. Therefore, all checks for'file-error' in 'condition-case', 'ignore-error', 'error-conditions' andthe like still work.New command 'tramp-cleanup-bufferless-connections'.Connection-related objects for which no associated buffers exist, exceptfor Tramp internal buffers, are flushed. This is helpful to pruneconnections after you close remote-file buffers without having to eithercherry-pick via 'tramp-cleanup-connection' or clear them all via'tramp-cleanup-all-connections'.External methods can now be used in multi-hop connections.This is implemented for 'tramp-sh' methods, like "/scp:user@host|sudo::".New command 'tramp-dired-find-file-with-sudo'.This command, bound to '@' in Dired, visits the file or directory on therecent Dired line with superuser, or root, permissions.I already have a little helper command called sudo that does just this for files and dired buffers. Very welcome addition though. Remember this should work with multi-hops also.'C-x x @' is now bound to 'tramp-revert-buffer-with-sudo'.You can use 'C-u C-x x @' to select a Tramp method other than thedefault, "sudo".As above, this is genuinely great. I like that you can pick something other than sudo.'tramp-file-name-with-method' can now be set as connection-local variable.New optional connection methods "surs" and "sudors".These connection methods are similar to "su" and "sudo", but they usethe modern 'su-rs' and 'sudo-rs' commands.Connection method "kubernetes" now supports an optional namespace.The host name for Kubernetes connections can be of kind"[CONTAINER.]POD[%NAMESPACE]", in order to specify the namespace to beused. This overrides the setting in 'tramp-kubernetes-namespace', ifany.Different proxies for the same destination host name can be specified.A typical example are docker containers, which run on different hostsunder the same docker name. When the user option'tramp-show-ad-hoc-proxies' is non-nil, such ad-hoc multi-hop file namescan be used in parallel. Example: on both remote hosts "host1" and"host2" there is a docker container "name", respectively: /ssh:user1@host1|docker:name: /ssh:user2@host2|docker:name:This feature is experimental.Wonderful stuff. Tramps works with podman also so I expect it’ll work with those too.Implementation of filesystem notifications for connection method "smb".Remote process support has been rewritten for the "smb" connection method.For more information, see "(tramp) Running remote processes on MSWindows hosts" in the Tramp manual.New functions to extend the set of operations with a remote implementation.The new functions 'tramp-add-external-operation' and'tramp-remove-external-operation' allow adding an implementation forother operations than the defined set of magic file name operations.This can be used by external ELPA packages for performance optimizationsin special cases. For more information, see "(tramp) New operations" inthe Tramp manual.New user option 'tramp-propagate-emacsclient-tramp'.When this option is non-nil, Tramp propagates the environment variableEMACSCLIENT_TRAMP with a proper value to remote processes. This ishelpful if you want to start emacsclient on a remote host from a processstarted inside Emacs.Isearch and ReplaceIsearch is Emacs’s interactive search bound to C-s. Replace is of course replacing text; Emacs has many of those too.Typing 'd' during 'query-replace' shows the diff buffer with replacements.Neat. Pair it with project-wide replacement like C-x p r to make sure you did not replace stuff you should not have.Diff.diff files, modes and related things. Emacs has a bunch of this stuff in various guises.'diff-mode' now refrains from automatically refining big hunks.What is big is defined by the new 'diff-refine-threshold' user option.Refining a hunk shows a shadow cursor at the beginning/end of region.By default, the shadow cursor looks like an empty rectangle the size ofa character cell. It is displayed at the beginning or the end of therefined region, to better show where the refined region starts or ends.This can be controlled by the new user option'smerge-refine-shadow-cursor', which also affects SMerge mode.New command 'diff-kill-ring-save'.This command copies to the 'kill-ring' a region of text modifiedaccording to diffs in the current buffer, but without applying the diffsto the original text. If the selected range extends beyond a hunk, thecommand attempts to look up and copy the text in between the hunks.Ha that’s really cool. I like that I can now copy the patched diff hunk from a buffer. The challenge will be in remembering the command; this is not something I have to do frequently.New command 'diff-revert-and-kill-hunk' bound to 'u' and 'C-c M-u'.This command reverts the hunk at point (i.e., applies the reverse of thehunk), and then removes the hunk from the diffs.This is useful to undo or revert changes, committed and uncommitted, whenyou are in buffers generated by 'C-x v =' and 'C-x v D'.When the region is active, the command reverse-applies and kills hunksthat the region overlaps.Oh yeah that’s awesome. I use Magit but I honestly prefer VC mode for in-buffer VC actions, so C-x v = and friends I use a lot.'v' is now bound to 'vc-next-action' in read-only Diff mode buffers.'s' is now bound to 'diff-split-hunk' in read-only Diff mode buffers.'diff-file-prev' and 'diff-hunk-prev' always move to start of header.Previously, 'diff-file-prev' and 'diff-hunk-prev' would move when pointis after the corresponding file or hunk header, but not when inside it.Now they will always move to the start of the current header.New command 'diff-delete-other-hunks' bound to 'C-c RET n'.This command deletes all hunks other than the current hunk. It isuseful to prepare a "*vc-diff*" buffer for committing a single hunk.When the region is active, it deletes all hunks that the region does notoverlap.'vc-version-diff' and 'vc-root-version-diff' changed default for REV1.They now suggest the previous revision as the default for REV1, not thelast one as before. This makes them different from 'vc-diff' and'vc-root-diff' when those are called without a prefix argument.'diff-apply-hunk' now supports creating and deleting files.'diff-apply-buffer' supports creating files but not deleting them, yet.Diff mode's application and killing commands now consider the region.If the region is active, 'diff-apply-hunk', 'diff-apply-buffer' and'diff-hunk-kill' now apply or kill all hunks that the region overlaps.Otherwise, they have their existing behavior.'diff-apply-buffer' can reverse-apply.With a prefix argument, it now reverse-applies hunks.This matches the existing prefix argument to 'diff-apply-hunk'.EdiffEdiff is a 3-way interactive merge tool in Emacs. It’s excellent but it will take a little getting used to.Ediff's copy commands now apply to all changes with 'C-u' prefix.The Ediff copy commands, bound to 'a', 'b', 'ab', etc., now copy allchanges when supplied with a universal prefix argument via 'C-u':- 'C-u a' copies all changes from buffer A to buffer B (in a 2-way diff) or to buffer C (in a 3-way diff or merge).- 'C-u b' copies all changes from buffer B to buffer A (in a 2-way diff) or to buffer C (in a 3-way diff or merge).- 'C-u a b' copies all changes from buffer A to buffer B.- 'C-u b a' copies all changes from buffer B to buffer A.- 'C-u a c' copies all changes from buffer A to buffer C.- 'C-u b c' copies all changes from buffer B to buffer C.- 'C-u c a' copies all changes from buffer C to buffer A.- 'C-u c b' copies all changes from buffer C to buffer B.Ediff now supports more flexible custom window layouts.Custom implementations of 'ediff-window-setup-function' no longer needto display all Ediff windows. Any of the A, B, C, and control windowscan be left undisplayed and the corresponding variable set to nil.This change enables custom layouts without a control panel window.DiredDired is Emacs’s superlative directory editor and file browser. It has a wide range of advanced features. See Dired Shell Commands: The find & xargs replacement, WDired: Editable Dired Buffers and Working with multiple files in dired.New user option 'dired-create-empty-file-in-current-directory'.When non-nil, 'dired-create-empty-file' creates a new empty file andadds an entry for it (or its topmost new parent directory if created)under the current subdirectory in the Dired buffer by default(otherwise, it adds the new file (and new subdirectories if provided) towhichever directory the user enters at the prompt). When nil,'dired-create-empty-file' acts on the default directory by default.Note that setting this user option to non-nil makes invoking'dired-create-empty-file' outside of a Dired buffer signal an error(like other Dired commands that always prompt with the currentsubdirectory, such as 'dired-create-directory').New user option 'dired-check-symlinks' allows disabling validity checks.Dired uses 'file-truename' to check symbolic link validity whenfontifying them, which can be slow for remote directories. Setting'dired-check-symlinks' to nil disables these checks. The new optiondefaults to t and can be set as a connection-local variable.New user option 'dired-hide-details-hide-absolute-location'.When Dired's 'dired-hide-details-mode' is enabled, also hide the'default-directory' absolute location, typically displayed as the firstline in a Dired buffer.With 'dired-hide-details-hide-absolute-location': project: (100 GiB available)Without 'dired-hide-details-hide-absolute-location': /absolute/path/to/my/important/project: (100 GiB available)Clicking on the base name of a directory reverts the buffer.When 'dired-make-directory-clickable' is non-nil, clicking on the basename of the directory now reverts the Dired buffer.'dired-copy-filename-as-kill' supports project-relative names.With a prefix argument value of 1, this command now copies file namesrelative to the root directory of the current project.Lovely, but gated behind a prefix value of 1 makes it very utilitarian and hard to find without reading the docstring.Warning when Dired displays a file name with a literal newline.If Dired uses an 'ls' implementation that supports the '-b' switch, thenon visiting a directory that contains a file whose name has a newline,and Dired displays that character as a literal newline, Emacs nowautomatically pops up a buffer warning that such a display can beproblematic for Dired and showing a way to change the display to use theunproblematic character '\n'.Dired (except on Windows and other such platforms where it is emulated) uses the output of ls to furnish the dired buffer with its directory information. That is why stuff like my Dired Shell Commands: The find & xargs replacement that show you how to use find-name-dired and friends is so powerful. It’s just a buffer with text enriched with Emacs commands, font locking and such. Such a powerful conceptSee Why Emacs has Buffers.New user option 'dired-auto-toggle-b-switch'.When this user option is non-nil and Dired uses an 'ls' implementationthat supports the '-b' switch and 'dired-listing-switches' does notinclude the '-b' switch, then on visiting a directory containing a filewhose name has a newline, Emacs automatically adds the '-b' switch andredisplays the directory in Dired to show '\n' in the file name insteadof a literal newline. This prevents executing many Dired operations onsuch a file from failing and signaling an error. The default value ofthis user option is nil.New Dired handling of errors from 'ls'.When invoking a Dired command causes 'ls' to emit an error message,Emacs now displays the message in a popped up buffer instead ofoutputting it in the Dired buffer and signalling an error.GrepGrep refers to Emacs’s wide range of grep wrapper commands. Note that you don’t have to use grep with them; you can of course change the tool to something else.Grep results can be edited to reflect changes in the originating file.Like Occur Edit mode, typing 'e' in the "*grep*" buffer will now makethe 'grep' results editable. The edits will be reflected in buffersvisiting the originating files. Typing 'C-c C-c' will leave the GrepEdit mode.Wonderful. Decades ago I wrote a little “extract” tool to do something similar as I often had to do precision edits across many files. This would’ve saved me a lot of time back in the day.Occur edit mode is another feature most people sleep on. Do try out M-s o occur to match stuff, and then edit it with e. Occur works with multiple buffers but it does need a little encouragement.ImenuImenu is Emacs’s generic selection interface for contextually interesting things in the current buffer: functions, classes, markdown headings, org mode headings, etc.For decades it had no key binding. Now it’s bound to M-g i. I use M-i because that has a worthless default command.New user option 'imenu-allow-duplicate-menu-items'.This specifies whether Imenu can include duplicate menu items.Duplicate items are now allowed by default (option value t), whichrestores the behavior before Emacs 29. Customize this to nil to get thebehavior of Emacs 29 and Emacs 30.Time StampYou don’t see it as much any more, but back in the day people would commonly update files (Changelogs, source code files, etc.) with the timestamp of when the file was last changed. I’m not saying it’s not needed any more, but source control in many ways supplanted the need for it. But if you still want Emacs to find and update time stamps, you can with M-x time-stamp, though you’ll want a hook on before save to ensure changes are applied automatically.'time-stamp' can up-case, capitalize and down-case date words.This control can be useful in languages in which days of the week and/ormonth names are capitalized only at the beginning of a sentence. Fordetails, see the built-in documentation for user option 'time-stamp-format'.Because this feature is new in Emacs 31.1, do not use it in the localvariables section of any file that might be edited by an older versionof Emacs.Some historical 'time-stamp' conversions now warn.'time-stamp-pattern' and 'time-stamp-format' had quietly acceptedseveral 'time-stamp' conversions (e.g., "%:y") that have been deprecatedsince Emacs 27.1. These now generate a warning with a suggestedmigration.Merely having '(add-hook 'before-save-hook #'time-stamp)'in your Emacs init file does not expose you to this change.However, if you set 'time-stamp-format' or 'time-stamp-pattern'with a file-local variable, you may be asked to update the value.TeX modesTeX and friends. I recommend AUCTeX to anybody serious about writing LaTeX especially in Emacs.New Xref backend for TeX modes.The new backend ('tex-etags') is on by default, and improves thefunctionality of the standard Xref commands in TeX buffers. You canrestore the standard 'etags' backend with the 'xref-etags-mode' toggle.Xref of course is Emacs’s generic cross-referencing feature that surfaces matches against search terms. Note again the “etags” here; back in the day, Emacs’s only real cross-referencing system was the wrapper around the external TAGS app. For compatibility with it, there are shims that try to serve both systems.BibTeX modeNew user options facilitate customization of BibTeX and biblatex entries.Entry definitions via the user options 'bibtex-BibTeX-aux-entry-alist','bibtex-biblatex-aux-entry-alist', 'bibtex-BibTeX-aux-opt-alist', and'bibtex-biblatex-aux-opt-alist' take precedence over'bibtex-BibTeX-entry-alist' and 'bibtex-biblatex-entry-alist'.These user options now support the definition of aliases that inheritthe definition of another entry.'bibtex-user-optional-fields' has been renamed to 'bibtex-aux-opt-alist'.The old name is an obsolete alias.'bibtex-include-OPTkey' is now obsolete and its default is nil.Use 'bibtex-aux-opt-alist' instead.New user option 'bibtex-entry-ask-for-key'.When non-nil, 'bibtex-entry' asks for a key.'bibtex-string-file-path' and 'bibtex-file-path' are lists of directories.For backward compatibility, considered obsolete, these user optionsmay still be strings of colon-separated lists of directories.Midnight modeMidnight mode is a garbage collector for buffers that runs, well, around midnight, or at a time of your choosing. It is well worth using, in my opinion, but watch your six: you want it to delete trash buffers and never anything important. It comes with a quite conservative (and to me mostly useless) set of defaultsMy setting looks like this:(use-package midnight :custom ((midnight-mode 1) (clean-buffer-list-delay-general 5) (clean-buffer-list-kill-buffer-names '("*Buffer List*" "*Compile-Log*" "*vc*" "*vc-diff*" "*diff*" "*gnus work*" "*Backtrace*")) (clean-buffer-list-kill-regexps (list (rx bos (? " ") (| "*magit" "magit-" "*Customize" "*mm*-"))))) :config (midnight-delay-set 'midnight-delay 6400))Change for activating the mode.Putting '(require 'midnight)' in your init file no longer activates themode. Now, one needs to customize 'midnight-mode' to non-nil or say'(midnight-mode 1)', instead.Python modePython, but note not the TS mode. If you’re a Python hacker try my Combobulate package.New 'repeat-map' for Python indentation commands.The commands 'python-indent-shift-left' and 'python-indent-shift-right'can now be repeated using 'repeat-mode'. With 'repeat-mode' enabled,after invoking one of these commands via 'C-c ', you cantype '' to repeat the command.Prefer "python" for 'python-interpreter' and 'python-shell-interpreter'.On recent versions of mainstream GNU/Linux distributions, "python"either does not exist or it points to Python 3. These user options nowdefault to using "python", falling back to "python3" if it does notexist. If "python" points to Python 2 on your system, you now need tocustomize these variables to "python3" if you want to use Python 3instead.Python 2 support is now optional and disabled by default.Since Python 2 EOL was over 5 years ago, this release removes Python2-only builtins such as "file" from the default highlighting in'python-mode' and 'python-ts-mode'. If you would like them highlighted,customize the new user option 'python-2-support' to a non-nil value andrestart Emacs.New Python support for 'electric-layout-mode'.'DEL' can delete text in the active region.When point is between indentation, the command'python-indent-dedent-line-backspace' (by default bound to 'DEL') nowdeletes the text in the region and deactivates the mark if TransientMark mode is enabled, the mark is active, and the value of the prefixargument is 1.Mmm, no, thank you. Python is a twitchy whitespace language. And heuristic whitespace deletion across multiple lines possible? Nah.'python-eldoc-function-timeout' now accepts floating-point numbers.To allow for finer-grained adjustment of timeout for'python-eldoc-function', 'python-eldoc-function-timeout' now acceptsfloating-point numbers as well as integers.But why is that a python-only construct?The default value of 'python-shell-completion-setup-code' is changed.A new function is added to the setup code. Users who modify this optionmay need to update the value for the Python shell completion to work.Tmm MenubarThis is an in-buffer emulation of Emacs’s menu-bar-mode using a modal-like system that is reminiscent of what Magit would eventually end up looking like, sort of. It’s one of several ways of opening the menu bar (M-x menu-bar-open being another)New shortcut '^' to navigate to the previous menu.New user option 'tmm-shortcut-inside-entry'.When non-nil, highlight the character shortcut in the menu entry'sstring instead of prepending it and 'tmm-mid-prompt' to said entry.FoldoutOutline-mode, which is what Org (was? is?) based off of back in the day as an outliner, has a number of extensions. foldout is one of them; it is not autoloaded by default.Improved behavior of 'foldout-exit-fold' with a negative prefix argument.When 'foldout-exit-fold' is called with a negative argument (so that theexited fold remains visible), the position of point and window view arepreserved.New command 'foldout-widen-to-current-fold'.This command widens the view to the current fold level when in a fold,or behaves like 'widen' if not in a fold.MPCMPC is a thin wrapper around the MPC daemon, a music player. I have never used it. I recommend EMMS if you want something with a wider reach: there are spotify plugins and all sorts for it.New user option 'mpc-notifications'.When non-nil, MPC (the Emacs front-end to Music Player Daemon) displaysa desktop notification when the song changes, using'notifications-notify'. The notification's title and body can becustomized using the new user options 'mpc-notifications-title' and'mpc-notifications-body'.New user option 'mpc-crossfade-time'.When non-nil, MPC will crossfade between songs for the specified numberof seconds. Crossfading can be toggled using the command'mpc-toggle-crossfade' or from the MPC menu.New command 'mpc-describe-song'.This command displays information about the currently playing song orsong at point in the "*MPC-Songs*" buffer. The list of tags to displaycan be customized using the new user option 'mpc-song-viewer-tags' andthe appearance of the list with the new faces 'mpc-table-key','mpc-table-value', and 'mpc-table-empty'.New command 'mpc-server-stats'.This command displays information about the connected MPD server. Theappearance of the list can be customized with the new faces'mpc-table-key' and 'mpc-table-value'.VCVC is Version Control, a wrapper around a slew of version control systems, including git, subversion, hg and many more. I really rate it. Before Magit/git became a thing, it was a life saver, abstracting away the tedium of each VCS into a set of common key bindings.Honestly, between me you and the lamp post, as VC gains more and more functionality, I find I reach for Magit less and less. I always preferred the way VC works.Printing root branch logs has moved to 'C-x v b L'.Previously, the command to print the root log for a branch was bound to'C-x v b l'. It has now been renamed from 'vc-print-branch-log' to'vc-print-root-branch-log', and bound to 'C-x v b L'. This is moreconsistent with the rest of the 'C-x v' keymap, and makes room for a newfileset-specific branch log command.To undo this change you can use (keymap-global-set "C-x v b l" #'vc-print-root-branch-log) (with-eval-after-load 'vc-dir (keymap-set vc-dir-mode-map "b l" #'vc-print-root-branch-log))New command 'C-x v b l' ('vc-print-fileset-branch-log').This command prints the log of VC changes to the current fileset onanother branch.VC Annotate for Mercurial repositories shows changeset hashes.To restore showing revision numbers instead of changeset hashes,customize the new user option 'vc-hg-annotate-show-revision-numbers' tonon-nil.'vc-hg-working-revision' now returns changeset hashes.Previously, it returned local revision numbers, but hashes are morerobust for how this function is typically used.New commands to handle repositories with multiple working trees.Some VCS support more than one working tree with the same backingrevisions store, such as with Git's 'worktree' subcommand andMercurial's 'share' extension. Emacs now has some commands to manageother working trees:- 'C-x v w c': Add a new working tree.- 'C-x v w w': Visit this file in another working tree.- 'C-x v w k': Kill buffers visiting this file in other working trees.- 'C-x v w s': Like 'C-x p p' but limited to other working trees.- 'C-x v w a': Copy or move fileset changes to another working tree.- 'C-x v w A': Copy or move all changes to another working tree.- 'C-x v w x': Delete a working tree you no longer need.- 'C-x v w R': Relocate a working tree to another file name.The new user option 'vc-no-confirm-moving-changes' controls whether'C-x v w a' and 'C-x v w A' ask for confirmation when moving changesbetween working trees. The default is to ask for confirmation.In addition, Lisp programs that extend VC can invoke the new backendfunctions to obtain a list of other working trees, and to add, removeand relocate them.Worktrees are becoming a lot more popular because of AI development in particular. I won’t lie: git’s worktrees suck, but at least it has some level of support for shallow copying a repository. I’m glad VC has added a generic wrapper system on top of it. I will have to experiment with it.Using 'e' from Log View mode to modify change comments now works for Git.New user option 'vc-allow-rewriting-published-history'.Some VCS commands can change your copy of published change historywithout warning. In VC we try to detect before that happens, and stop.You can customize this option to permit rewriting history even thoughEmacs thinks it is dangerous.'vc-clone' is now an interactive command.When called interactively, 'vc-clone' now prompts for the remoterepository address, and the directory into which to clone therepository. It tries to automatically determine the VC backend forcloning, or prompts for that, too.Useful. VC is weird like that; it’s surprisingly feature rich, and yet it is often missing little convenience features like this.'vc-clone' now accepts an optional argument OPEN-DIR.When the argument is non-nil, the function switches to a buffer visitingthe directory into which the repository was cloned.'vc-revert' is now bound to '@' in VC Directory.C-x v d asks your VCS to show a directory overview. It’s the focal point of Emacs’s VC in many ways.'vc-revert' is now additionally bound to 'C-x v @'.This is in addition to 'C-x v u'.'vc-rename-file' is now bound to 'C-x v R'.'vc-revert' now works on directories listed in VC Directory.Reverting a directory means reverting changes to all files inside it.New global minor mode 'vc-auto-revert-mode'.This is like 'global-auto-revert-mode' but limited to VCS-tracked files.As compared with VC's existing, default support for reverting filesafter VCS operations, the new mode is a more reliable way to ensure thatEmacs reverts buffers visiting tracked files when VCS operations changethe contents of those files.New commands to cherry-pick and revert revisions.The commands 'vc-cherry-pick', 'vc-revert-or-delete-revision','vc-revert-revision' and 'vc-delete-revision' let you copy revisionsbetween branches, revert and delete revisions.From Log View buffers, you can use 'C' to cherry-pick the revision atpoint or all marked revisions, and 'R' to undo the revision at point orall marked revisions.New commands to rewind branches.In Log View mode, 'x' deletes revisions newer than the revision at pointfrom the history of the current branch, though without undoing thechanges made by those revisions to the working tree. 'X' is similarexcept that it does remove the changes from the working tree.New command 'log-edit-done-strip-cvs-lines'.This command strips all lines beginning with "CVS:" from the buffer.It is intended to be added to the 'log-edit-done-hook' so that'vc-cvs-checkin' behaves like invoking 'cvs commit [files...]' from thecommand line.New user options 'vc-resolve-conflicts' and 'vc-*-resolve-conflicts'.They control whether to mark a conflicted file as resolved when saving.You can now control it globally, with 'vc-resolve-conflicts', or forspecific backends with 'vc-bzr-resolve-conflicts','vc-hg-resolve-conflicts', and 'vc-svn-resolve-conflicts'.New value for 'vc-git-resolve-conflicts'.The option now accepts the symbol 'default' as a value, which isits default value. Effectively, the default value hasn't changed,since 'vc-resolve-conflicts' defaults to t, the previous default valuefor 'vc-git-resolve-conflicts'.VC Directory can now automatically add and remove marks on other lines.When you try to use a mark or unmark command where doing so wouldbe permitted only if other lines were marked or unmarked first, Emacswill now ask you if you'd like to change the marks on those other lines.For example, if you try to mark a file contained within a directory thatis already marked, Emacs will offer to unmark the directory, first.Previously, Emacs would simply refuse to make any changes.You can customize 'vc-dir-allow-mass-mark-changes' to restore the oldbehavior or dispense with the prompting.'C-x v x' and VC Directory's 'd' command can now delete unregistered files.Previously, these commands could only delete registered files.To restore the old, more limited behavior for VC Directory, you can do (keymap-set vc-dir-mode-map "d" #'vc-dir-clean-files)New VC Directory bindings 'z d' and 'D' to delete Git stashes.These correspond to the existing 'z p' to pop a stash and 'P' to pop thestash at point (deleting the stash at point is also bound to 'C-k').New VC Directory command 'V' ('vc-dir-root-next-action').This is like 'v' ('vc-next-action') but applies to the whole VC Directorybuffer, ignoring the position of point and any marks. This is useful tocheck in all local changes at once.VC Directory can now register files when checking in mixed filesets.Previously, if some files to be checked in were unregistered but otherswere added, removed or edited, Emacs would refuse to proceed.Now Emacs prompts to register the unregistered files, so that allfiles in the fileset are in a compatible state for a checkin.'C-x v v' handles missing and removed files more consistently.Missing files are those which have been removed from the filesystem butwhich are still tracked by version control. Removed files are thosescheduled to be removed from version control in the next commit.Previously, different backends were inconsistent about applying thesestatuses to files, and 'C-x v v' behaved subtly differently for the twostatuses. The combination of these differences between backends and in'C-x v v' behavior was confusing. Now,- in VC Directory, you can use 'C-x v v' on missing files to mark them as removed- when committing, you can include missing files in a set of files with different statuses, just like you've always been able to include removed files.In addition, the Git backend has been fixed to display missing files as'missing' instead of incorrectly subsuming them to the 'removed' status.There is still some further work to do to rationalize VC's handling offile removal.C-x v v is the workhorse command. It does the next logical action: add a file; commit changes; etc.New user option 'vc-dir-auto-hide-up-to-date'.If you customize this option to 'revert', the 'g' command to refreshthe VC Directory buffer also has the effect of the 'x' command.That is, typing 'g' refreshes the buffer and also hides items in the'up-to-date' and 'ignored' states.If you customize this option to any other non-nil value, then inaddition, hide items whenever their state would change to 'up-to-date'or 'ignored'.New user option 'vc-dir-save-some-buffers-on-revert'.If you customize this option to non-nil, Emacs will offer to saverelevant buffers before generating the contents of a VC Directory buffer(like the third-party package Magit does with its status buffer).New commands to report incoming and outgoing diffs.'vc-root-diff-incoming' and 'vc-root-diff-outgoing' report diffs of allthe changes that would be pulled and would be pushed, respectively.They are the diff analogues of the existing commands'vc-root-log-incoming' and 'vc-root-log-outgoing'.In particular, 'vc-root-diff-outgoing' is useful as a way to previewyour push and ensure that all and only the changes you intended toinclude were committed and will be pushed.'vc-diff-incoming' and 'vc-diff-outgoing' are similar but limited to thecurrent VC fileset.New commands to report information about unintegrated changes.'C-x v T =' ('vc-diff-unintegrated') and 'C-x v T D'('vc-root-diff-unintegrated') report diffs of changes since the mergebase with the remote branch, including uncommitted changes.'C-x v T l' ('vc-log-unintegrated') and 'C-x v T L'('vc-root-log-unintegrated') show the corresponding revision logs.These are useful to view all outstanding (unmerged, unpushed) changes onthe current branch. They are also available as 'T =', 'T D', 'T l' and'T L' in VC Directory buffers.'C-x v T R =' ('vc-diff-remote-unintegrated'), 'C-x v T R D'('vc-root-diff-remote-unintegrated'), 'C-x v T R l'('vc-log-remote-unintegrated') and 'C-x v T R L'('vc-root-log-remote-unintegrated') are corresponding commands whichreport information about the remote versions of a topic branch.Ah this is really useful. I’ll have to experiment with them and see if they present things in a more useful way than Magits’. One common problem I often have with work is that I do a lot of work in worktrees nowadays. I’ve built out some shell scripts to see how far ahead/behind they are, and whether they cleanly merge. So it’d be nice if I can re-use some of the code here maybe to do that.New commands to report combined diffs of all local changes.'C-x v E =' ('vc-diff-outgoing-and-edited') and 'C-x v E D'('vc-root-diff-outgoing-and-edited') report combined diffs of alloutgoing changes plus any uncommitted changes. They are useful to showall work that's present only locally.New user option 'vc-use-incoming-outgoing-prefixes'.If this is customized to non-nil, 'C-x v I' and 'C-x v O' become prefixcommands, such that the new incoming and outgoing commands have globalbindings:- 'C-x v I L' is bound to 'vc-root-log-incoming'- 'C-x v I =' is bound to 'vc-diff-incoming'- 'C-x v I D' is bound to 'vc-root-diff-incoming'- 'C-x v O L' is bound to 'vc-root-log-outgoing'- 'C-x v O =' is bound to 'vc-diff-outgoing'.- 'C-x v O D' is bound to 'vc-root-diff-outgoing'.New display of outgoing revisions count in VC Directory.If there are outgoing revisions, VC Directory now includes a count ofhow many in its headers, to remind you to push them. If this is slow,you can disable it by customizing 'vc-dir-show-outgoing-count' to nil.(In Emacs 32 it will be populated asynchronously.)New user option 'vc-async-checkin' to enable async checkin operations.Currently only supported by the Git and Mercurial backends.New user option 'vc-display-failed-async-commands'.If non-nil, displays the buffer with the output of the failed commandwhen an asynchronous VC command (e.g., pulls and pushes) fails.New 'log-edit-hook' option to display diff of changes to commit.You can customize 'log-edit-hook' to include its new'log-edit-maybe-show-diff' option to enable displaying a diff of thechanges to be committed in a window. This is like the 'C-c C-d' commandin Log Edit mode buffers, except that it does not select the "*vc-diff*"buffer's window, and so works well when added to 'log-edit-hook'.'vc-annotate' now abbreviates the Git revision in more cases.In Emacs 30, 'vc-annotate' gained the ability to abbreviate the Gitrevision in the buffer name. Now, it also abbreviates the Git revisionwhen visiting other revisions, such as with'vc-annotate-revision-previous-to-line'.New buffer-local variable 'vc-buffer-overriding-fileset'.Primarily intended for buffers not visiting files, this specifies theVC backend and VCS-managed file name or file names to which the buffer'scontents corresponds. It overrides the behavior of 'vc-deduce-fileset'.This replaces and generalizes the old 'vc-annotate-parent-file'.New buffer-local variable 'vc-buffer-revision'.This specifies the revision to which the buffer's contents corresponds.This replaces and generalizes the old 'vc-annotate-parent-rev'.The 'log-incoming' and 'log-outgoing' functions are deprecated.Backend authors should implement the 'incoming-revision' and 'mergebase'backend functions instead. These are jointly sufficient to support the'C-x v I' and 'C-x v O' commands.Marking revisions in Log View now works more like other modes.Previously, 'm' toggled whether the current revision was marked, anddidn't advance point. Now 'm' only adds marks, 'u' removes marks, andboth advance point, like how marking works in Dired and VC Directory.You can get back the old behavior with something like this: (with-eval-after-load 'log-view (keymap-set log-view-mode-map "m" #'log-view-toggle-mark-entry))In addition, a new command 'U' removes all marks.New commands 'M-RET', 'M-p' and 'M-n' in Log View mode.'M-RET' expands the current entry, if relevant, and displays its diff inanother window. 'M-p' and 'M-n' move to the previous and next entries,respectively, expand them if relevant, and display their diffs.You can use these three commands together to more easily view all thelog entries and diffs of a series of revisions: use 'M-RET' on the firstrevision, then either 'M-n' or 'M-p' repeatedly to view the others.Log view (C-x v l) is a feature (along with C-x v = for a diff of changes in the current buffer) that I use the most. They work anywhere and give me immediate insight into changes in a file.New command 'w' in Log View mode.The new command 'log-view-copy-revision-as-kill', bound to 'w' in LogView mode, copies to the kill ring the ID of the revision at point inthe log entry. If there are marked revisions, it copies the IDs ofthose, instead.New commands 'vc-print-change-log' and 'vc-print-root-change-log'.These are just like 'vc-print-log' and 'vc-print-root-log' except thatthey have a different prefix argument that some users may prefer.With a prefix argument, these commands prompt for a branch, tag or otherreference to a revision to log, and a maximum number of revisions toprint. If you find this prefix argument more useful, or more mnemonic,than the prefix arguments that 'vc-print-log' and 'vc-print-root-log'already have, consider replacing the default global bindings, like this: (keymap-global-set "C-x v l" #'vc-print-change-log) (keymap-global-set "C-x v L" #'vc-print-root-change-log)New command alias 'vc-restore' for 'vc-revert'.The 'diff-restrict-view' command is disabled by default.This command is Diff mode's specialized 'narrow-to-region'.'narrow-to-region' has long been disabled by default, so forconsistency, 'diff-restrict-view' is now too.To enable it again, use 'enable-command'.'C-x v !' now has its own input history.'C-x v +' for Git pulls from a configured push remote.If the current branch has a configured push remote, the defaultarguments to 'git pull' will cause a pull from the push remote.You can use 'C-u C-x v +' to preview or change the arguments.'C-u C-x v +' and 'C-u C-x v P' for Git have an input history.This was already in place for Mercurial.vc-dav.el is now obsolete.PackageEmacs’s package manager.No longer warn if a package has no footer line.package.el no longer warns for packages without a "footer line", whichis the line that usually appears at the very end of an Emacs Lisp file: ;;; FILENAME ends hereNew optional argument to 'package-autoremove'.An optional argument NOCONFIRM has been added to 'package-autoremove'.If it is non-nil (interactively, with a prefix argument),'package-autoremove' will not prompt the user for confirmation beforeremoving packages.New prefix argument for 'package-install-selected-packages'.When invoked with a prefix argument, 'package-install-selected-packages'will not prompt the user for confirmation before installing packages.'package-refresh-contents' runs asynchronously.Refreshing the package index will no longer block when invokedinteractively.'package-upgrade' no longer accepts a string argument.When called from Lisp, it now only accepts a symbol.'package-install-from-buffer' respects files marked by Dired.When invoking the command in a Dired buffer with marked files,the command will copy only those files.'package-isolate' can now also install packages.If a package is missing, 'package-isolate' will fetch the missingtarballs and prepare them to be activated in the sub-process.package-x.el is now obsolete.The command 'package-vc-install-from-checkout' is now obsolete.Use the User Lisp directory instead: see Info node "(emacs) User LispDirectory". This also means that combining the 'use-package' keywords':vc' and ':load-path' is obsolete.Er… what. So the idea is that you put files in 31’s new user lisp directory, which is the feature I talked about earlier that finds and installs autoload cookies; byte compiles; etc.And the idea here is that you just git clone or whatever in this directory instead of using the just recently added(!!) :vc feature in use-package.But now that disconnects people who prefer colocating all their changes in use-package definitions. They now need the new user directory; a method of installing/cloning their packages into that directory; and at no point does that tie back to a use-package definition.Bizarre change. Really bizarre.Package menu now highlights packages marked for installation or deletion.Package menu now displays the total number of the package type.The package menu now displays in the mode line the total number ofpackages installed, the total number of packages from all the packagearchives, the total number of packages to upgrade and the total numberof new packages available.New functions to query builtin package information.'package-versioned-builtin-packages' returns a list of symbols ofbuilt-in packages; 'package-builtin-package-version' returns theversion-list of a given package symbol. These functions provide publicinterfaces for external tools to query information about built-inpackages.Uninstalling a package now removes its directory from 'load-path'.Packages can be reviewed before installation or upgrade.The user option 'package-review-policy' can configure which packagesthe user should be allowed to review before any processing takes place.The package review can include reading the downloaded source code,presenting a diff between the downloaded code and a previousinstallation or displaying a ChangeLog.New command 'package-autosuggest'.Using a built-in database of ELPA package suggestions, this command willinstall viable packages if no specific major mode is available for thecontents of the current buffer.That feels useful to people. Teach them about other useful packages…New minor mode 'package-autosuggest-mode'.When enabled, this displays indications about the availability of add-onELPA packages for the current buffer and suggestions for installingthose packages. The default is to show a button on the mode line thatcan be used to install such packages, but you can customize thepresentation style of these suggestions using'package-autosuggest-style'.Buuut of course it is not enabled by default.New user option 'package-retention-policy'.This user option controls what previous packages versions to keep onupgrade. By default, this is set to nil, to keep the previous behavior.Packages are now checked for recursive dependencies before installing.If a package has dependencies not available on any of the archives in'package-archives', it will appear as unavailable, with the reasonsstated in its description.RcircOne of two IRC clients in Emacs.Authentication via NickServ can access auth source passwords.For details, consult 'rcirc-authinfo'.XrefAs I mentioned before, xref is Emacs’s cross-referencing implementation, and a replacement for the old TAGS finder system.Xref commands that jump to some location use 'display-buffer'.The commands that jump to some location use 'display-buffer' and specifythe category 'xref-jump'. As a result, you can customize how thedestination window is chosen using 'display-buffer-alist'. Example: (setq display-buffer-alist '(((category . xref-jump) (display-buffer-reuse-window display-buffer-use-some-window) (some-window . mru))))Neat change. But of course it’s yet more complexity front-loaded into display-buffer-alist, probably the most complex variable in Emacs today. Basically when Emacs has to pick where a buffer goes, it goes through a cascading list of user-customized and predefined options with safe fallbacks. But display-buffer-alist (and therefore Emacs) has to be taught to show buffers in just the right way, or your customizations won’t apply.But how can display-buffer-alist (or you, the customizer) know that a buffer that is about to appear came from xref? Well, you can’t… so there is a new (category N) selector that effectively says “if you come from an xref-jump, reuse a an existing window that displays this buffer; otherwise pick a window, but make sure that you pick the most-recently-used.”Confused? See Demystifying Emacs’s Window Manager.New minor mode 'xref-mouse-mode'.This minor mode binds 'xref-find-definitions-at-mouse' to'C-', allowing you to control-click to jump to adefinition, following the convention from other editors. The globalminor mode 'global-xref-mouse-mode' enables this in all buffers.New command 'xref-change-to-xref-edit-mode'.It is bound to 'e' and it switches an Xref buffer into an "editable"mode, like similar features in Occur and Grep buffers.Wonderful news. Editable buffers is such an Emacs-shaped feature to have, I was quite surprised when Xref first came out that it did not do this at all.RevertVariable 'revert-buffer-in-progress' has been renamed.The old name, 'revert-buffer-in-progress-p', is kept as an obsoletevariable alias. (Symbol names with a trailing '-p' are conventionallyreserved for predicates.)AutorevertThe auto-revert-mode minor mode reverts a buffer when certain conditions are met: VC changes, file changed on the file system, and so on.New variable 'inhibit-auto-revert-buffers'.While a buffer is member of this variable, a list of buffers,auto-reverting of that buffer is suppressed.I actually thought Emacs already had this feature. So I am a little surprised that it only just made an appearance in Emacs 31.I suspect most people won’t have an immediate use for this, as auto-revert is rather conservative about reversions.New macro 'inhibit-auto-revert'.This macro adds the current buffer to 'inhibit-auto-revert-buffers',runs its body, and removes the current buffer from'inhibit-auto-revert-buffers' afterwards.New variable 'auto-revert-buffer-in-progress'.'auto-revert-buffer' binds this variable to a non-nil value while it isworking. This can be used by major mode 'revert-buffer-function'implementations to suppress messages in Auto Revert modes, for example.StrokesStrokes is a mouse gesture recognition mode. Draw shapes with your mouse and you can trigger a range of actions. See M-x strokes-help.'strokes-mode' no longer demands the presence of a mouse.'strokes-mode' now permits itself to be enabled if no mouse isconnected, to facilitate enabling 'strokes-mode' in sessions where theavailability of a mouse device varies during execution (as is frequentlyobserved on Android).Okay so the mouse thing no longer needs a mouse, but I can’t intuit if that means touch gestures now trigger it on android? Because that… seems like a natural fit for strokes-mode?Yank Media'yank-media' now auto-selects the most preferred MIME type.Major-mode authors can customize the variables'yank-media-autoselect-function' and/or 'yank-media-preferred-types' tochange the selection rules.Most people know you can yank text with C-y; few know you can yank media (images in clipboard) with M-x yank-media. I use it with mu4e, the Emacs email client. In typical Emacs fashion, the yank-media command asks me a lot of useless information like whether I want to use mime type ppm or equally antique stuff when what I really want is just… you know, to insert an image? So this is a welcome change.RememberRemember is a bit like org-capture, but predates it. Pretty sure org mode can capture remember snippets for you also.Remember mode is now a minor mode.The 'remember' command enables the major mode set in'remember-initial-major-mode' and then the 'remember-mode' minor mode inthe 'remember-buffer'. This allows users to customize the major modeused to write notes.New handler that appends remember data in directory.The 'remember-append-in-data-directory' handler appends remember data ina file, that file being chosen by the user through the minibuffer.New prefix map for remember commands.Meant to be given a global binding convenient to the user. Example: (keymap-global-set "C-c r" 'remember-prefix-map)SpeedbarSpeedbar is a file browser that pops up a frame. I never liked it: looks awful, opens a frame, hoards space, and tells me mostly-useless information: what is going on in a directory. I prefer dired for when I want to know what’s up in a directory, but I appreciate that many people do not agree with me here.New commands for Speedbar.- 'speedbar-window-mode' opens Speedbar in a window instead of a frame.- 'speedbar-window' is an alias for 'speedbar-window-mode'.About time. Speedbar got merged in as part of the CEDET large hadron collider event some 15 years ago and it’s sat there untouched ever since.New user options for Speedbar.- 'speedbar-prefer-window' tells 'speedbar' to open a side window instead of a frame.- 'speedbar-window-dedicated-window' defines whether 'speedbar' is displayed in a dedicated window.- 'speedbar-window-default-width' defines the initial width of the 'speedbar-window'.- 'speedbar-window-max-width' defines the maximum width of the 'speedbar-window' when it is closed and then restored.Ugh. I mean look I get that if you’re going to cram speedbar into a window, you probably want it flush in a sidebar (meaning it always appears in one of four edges of your frame) and that it should never share its window with another buffer (hence marking it dedicated.)But Emacs already has a display buffer system for this; by adding weird variables (even if they edge-trigger and set a display-buffer-alist rule) you’re effectively creating the same two-tier system Emacs has spent 10 years trying to undo.'speedbar-easymenu-definition-trailer' is now a function.IcompleteIcomplete is a fast completion system going back to the 90s. It saw a lot of updates as Emacs modernized its Minibuffer Completion system. Ido Mode is loosely inspired by/has borrowed code from icomplete.Change in meaning of 'icomplete-show-matches-on-no-input' (again).For Emacs 28 to Emacs 30, when 'icomplete-show-matches-on-no-input' wasnon-nil, 'RET' had special behavior when the minibuffer's contents wasequal to the initial input it had right after minibuffer activation.In that case, 'RET' would choose the first completion candidate, ifthere was one, instead of the minibuffer's default value.'RET' has now returned to selecting the default value in this case; youcan use 'C-j' to choose the completion under point instead.You can opt back in to the special behavior of 'RET' like this: (keymap-set icomplete-minibuffer-map " " #'icomplete-ret)New user options for 'icomplete-vertical-mode'.New user options have been added to enhance 'icomplete-vertical-mode':- 'icomplete-vertical-in-buffer-adjust-list' aligns in-buffer completion to the original cursor column.- 'icomplete-vertical-render-prefix-indicator' adds a prefix indicator to completion candidates.- 'icomplete-vertical-selected-prefix-indicator' specifies the prefix string for the selected candidate.- 'icomplete-vertical-unselected-prefix-indicator' specifies the prefix string for non-selected candidates.New faces for 'icomplete-vertical-mode'.New faces have been added to 'icomplete-vertical-mode':- 'icomplete-vertical-selected-prefix-indicator-face' controls the appearance of the selected candidate prefix.- 'icomplete-vertical-unselected-prefix-indicator-face' controls the appearance of unselected candidate prefixes.CustomCustom is Emacs’s customize interface and internal subsystems.New function 'custom-initialize-after-file-load'.Useful to delay initialization to the end of the file, so it can usefunctions defined later than the variable, as is common for minor modes.'define-globalized-minor-mode' now automatically uses it if the':init-value' is non-nil.Probably a sensible thing to enable if you’re a heavy Customize user.New major mode 'Custom-dirlocals-mode'.This is intended for customizing directory-local variables in thecurrent directory's ".dir-locals.el" file.New binding 'C-c C-k' for 'Custom-reset-standard'.New command 'C-c TAB' ('Custom-goto-first-choice').When first opening the customization interface for a user option, youcan use this command as a shortcut to jump to the first actionablebutton or field (for instance an on/off button for boolean options, or atext field for other values).':set' functions should accept an optional argument BUFFER-LOCAL.This is the third argument, in addition to SYMBOL and VALUE. If thatargument's value is 'buffer-local', the ':set' function should use'set-local' to set the value of its SYMBOL argument locally in thecurrent buffer. This is used by 'setopt-local', which will signal anerror if this optional argument is not supported by the ':set' function.The 'defcustom' ':local' keyword can now be 'permanent-only'.This means that the variable's 'permanent-local' property is set to t,without marking it as automatically buffer-local.PulseAnother CEDET feature that landed in Emacs some 15 years ago. This one pulses stuff in the ui. Quite handy if a bit distracting, and now used in a wide range of things.New user option 'pulse-face-duration'.This option controls the flash duration for 'flash-face-bell-function'and 'flash-echo-area-bell-function'.New function 'pulse-faces'.This function pulses a specified list of faces. The pulse duration isdetermined by the new user option 'pulse-face-duration'.EdebugEmacs’s Emacs Lisp debugger, written in (of course) Emacs Lisp. Not to be confused with the classic debug elisp debugger, of course.New command 'edebug-bounce-to-previous-value' (bound to 'P').This command temporarily displays the outside current buffer with theoutside point corresponding to the previous value, where the previousvalue is what Edebug has evaluated before its last stop point or whatthe user has evaluated in the context outside of Edebug.This replaces the binding of command 'edebug-view-outside' to 'P', whichis still available on 'v'.FlymakeFlymake is Emacs’s “on-the-fly” syntax/error/lint checker that highlights info, warnings and errors in the buffer.Enhanced 'flymake-show-diagnostics-at-end-of-line'.The new value for this user option 'fancy' attempts to lay outdiagnostics below the affected line, using unicode graphics to point tothe diagnostic locus.Flymake is really a two-tier system. There’s the high-level overview: squiggly underlines, backgrounded text, etc. that tells you there is a reported issue. The second tier is the detail tier that tells you exactly what happens. You can opt for a popup buffer and/or eldoc integration.Now there is a third. You can now tell Emacs to insert diagnostic messages flush in the buffer at the end of the line where the change occurred, like other IDEs.I’m sure a lot of people will find it very useful, but it is not for me. Emacs’s overlay system is nice and all, but flickering text and stuff disappearin and reappearing as the flymake mode reruns will surely drive a lot of people crazy.Enhanced 'flymake-show-buffer-diagnostics'.The command 'flymake-show-buffer-diagnostics' is now capable ofhighlighting a nearby diagnostic in the resulting listing.Additionally, it is bound to mouse clicks on fringe and marginindicators, operating on the diagnostics of the corresponding line.You can bind it yourself in other situations too, such as in thediagnostic overlay map.More powerful 'flymake-make-diagnostic' API.Flymake backends can now specify origin and code attributes, allowingFlymake and other extensions to segregate diagnostics based on thisextended information.New user option 'flymake-diagnostic-format-alist'.This provides fine-grained control over diagnostic formatting acrossdifferent contexts, allowing you to specify which components (origin,code, message or one-liner message) appear in each output destination.One of the problems with flymake is that its backends do crude filtering to separate the wheat from the chaff. But if you want to exclude very particular things, it’s often a bit of a chore, as you’re effectively forced to rewrite the filter routine to handle weird exceptions like never show warnings X, Y, and Z.Dynamic column sizing in diagnostic listings.The tabulated listings produced by 'flymake-show-buffer-diagnostics' and'flymake-show-project-diagnostics' now automatically adjust their columnwidths based on content, optimizing display space and readability.New value 'auto' of user option 'flymake-indicator-type'.This value (set by default) tries to use fringes if possible, otherwisefalls back to margins.New user option 'elisp-flymake-byte-compile-executable'.This allows customizing the Emacs executable used for Flymake bytecompilation in 'emacs-lisp-mode'. This option should be set when editingLisp code which will run with a different Emacs version than the runningEmacs, such as code from an older or newer version of Emacs. This willprovide more accurate warnings from byte compilation.SQLiteEmacs has builtin support for SQLite, though it does require that you compile Emacs with it. Most distros seem to do so by default.SQLite databases can now be opened in read-only mode.The new optional argument READONLY of function 'sqlite-open' allowsopening an existing database only for reading.'sqlite-open' now recognizes 'file://' URIs as well as file names.'file://' URIs are supported by default. In the unusual case that anormal file name starts with "file:", you can disable the URIrecognition by calling 'sqlite-open' with the new optional argumentDISABLE-URI non-nil.'sqlite-close' now does nothing if the connection is already closed.GUDGUD, or the Grand Unified Debugger, is a multi-window debugger for the likes of gdb, pdb and so on. It is very feature rich.'pdb', 'perldb', and 'guiler' suggest debugging the current file via 'M-n'.When starting these debuggers (e.g., 'pdb') while visiting a file,pressing 'M-n' in the command prompt suggests a command line includingthe file name, using the minibuffer's future history.CalendarEmacs’s M-x calendar is surprisingly useful and feature rich, with a laundry list of builtin calendaring features.New command 'C-l' ('calendar-recenter').This command recenters the month of the date at point.Mouse wheel bindings for scrolling the calendar.You can now use the mouse wheel to scroll the calendar by 3 months.With the shift modifier, it scrolls by one month. With the metamodifier, it scrolls by one year.Simpler key bindings for navigation in calendar by months and by years.The month and year navigation key bindings 'M-}', 'M-{', 'C-x ]' and'C-x [' now have the alternative keys '}', '{', ']' and '['.Avoid modifying Calendar's user options.The user options 'calendar-mark-holidays-flag' and'calendar-mark-diary-entries-flag' are no longer modified when changingthe marking state in the calendar buffer.New library for iCalendar data.A new library has been added to Emacs for handling iCalendar (RFC 5545)data. The library is designed for reuse in other parts of Emacs and inthird-party packages. Package authors can find the new library in theEmacs distribution under "lisp/calendar/icalendar-*.el".Most of the functions and variables in the older icalendar.el have beenmarked obsolete and now suggest appropriate replacements from the newlibrary. diary-icalendar.el provides replacements for the diary-relatedfeatures from icalendar.el; see below.DiaryDiary - a diary that sort-of goes hand in hand with the calendar feature. It’s got a lot of esoteric features that warrants a deeper dive, to be honest. If you’re in the market for such a feature, do check out its (rather basic) info pages and associated calendaring features.New user option 'diary-date-insertion-form'.This user option determines how dates are inserted into the diary byLisp functions. Its value is a pseudo-pattern of the same type as in'diary-date-forms'. It is used by 'diary-insert-entry' when insertingentries from the calendar, or when importing them from other formats.New library diary-icalendar.el.This library reimplements features previously provided by icalendar.el:import from iCalendar format to the diary, and export from the diary toiCalendar. It also adds the ability to include iCalendar files in thediary and display and mark their contents in the calendar withoutimporting them to the diary file. The library uses the new iCalendarlibrary (see above) and makes diary import and export more customizable.New commands to display more months in the calendar.'calendar-show-more-months' and 'calendar-show-fewer-months' displaymore or fewer months in the calendar, respectively. The calendar showsat most 12 months and at least 3 months.'calendar-scroll-left-three-months' and its variants are obsolete aliases.Because the calendar can now display more than three months, commands'calendar-scroll-left-three-months' and'calendar-scroll-right-three-months' have been renamed to'calendar-scroll-calendar-left' and 'calendar-scroll-calendar-right'.The old names are kept for now as obsolete aliases.CalcOne of two calculators in Emacs. This is the uber-advanced Computer Algebra System and reverse polish notation calculator bound to M-x calc. Well worth learning if you need a calculator. Every time I read about it or explore the manual, I learn new amazing things about it.New user option 'calc-string-maximum-character'.Previously, the 'calc-display-strings', 'string', and 'bstring'functions only considered integer vectors whose elements are all in theLatin-1 range 0-255. This hard-coded maximum is replaced by'calc-string-maximum-character', and setting it to a higher value allowsthe display of matching vectors as Unicode strings. The default valueis 0xFF or 255 to preserve the existing behavior.New user option 'calc-inhibit-startup-message'.If it is non-nil, inhibit Calc from printing its startup message. Thedefault value is nil to preserve the existing behavior.TimeM-x world-clock, M-x lunar-phases, etc.New user option 'world-clock-sort-order'.This option controls the order of timezone entries in the 'world-clock'.By default, no sorting is done, and entries appear in the same order asin 'world-clock-list'. Any format understood by 'format-time-string'can be used to specify a key for the sort order, which is updated uponeach refresh. The sort direction can be controlled by using a cons cellof a format string and a boolean. Alternatively, a sorting function canbe provided directly.New user option 'display-time-help-echo-format'.This option controls the format of the help echo when hovering over thetime.FillFill region and its new counterpart in 31, the M-x unfill-paragraph.New variable 'fill-region-as-paragraph-function'.The new variable 'fill-region-as-paragraph-function' provides a way tooverride how functions like 'fill-paragraph' and 'fill-region' filltext. Major modes can bind this variable to a function that fits theirneeds. It defaults to 'fill-region-as-paragraph-default'.NewstickerThis is an RSS feed reader that is built into Emacs. I never really got on with it. I always felt like it had too many stateful things going on, and if you snuck up behind it and ran the wrong command, something always got wedged, and it’d end up in a weird doom loop.If you love RSS, as I am sure you do, try the Elfeed package instead.New user option 'newsticker-hide-old-feed-header'.It controls whether to automatically hide the header of feeds whoseitems are all old or obsolete in the plainview "*newsticker*" buffer.This is only visually interesting if the content of those feeds are alsohidden (see 'newsticker-hide-old-items-in-newsticker-buffer' and'newsticker-show-descriptions-of-new-items').New commands to hide and show headers of old newsticker feeds.The new commands 'newsticker-hide-old-feed-header' and'newsticker-show-old-feed-header', bound to 'h h' and 's h',respectively, hide and show the headers of feeds whose items are all oldor obsolete.CPerl modeSyntax of Perl up to version 5.42 is supported.CPerl mode creates Imenu entries for ":writer" generated accessors andrecognizes the new builtin functions "all" and "any".See https://perldoc.perl.org/5.42.0/perldelta for details.ZoneM-x zone is Emacs’s screensaver. I do recommend turning it on, but only in an environment where your colleagues are likely to walk past your monitor and see your screen go completely postal.Zone can scramble multiple windows across multiple frames; it may alsoreorganize frames to be a single window. As before, when a key or mouseevent occurs, all of the frames and windows are restored to theiroriginal state. This is controlled by three new user options whichcontrol the use of frames and windows beyond the currently active ones.It identifies suitable buffers for zoning out so that potentiallyimportant buffer contents are not exposed.Ordinarily, if you’re read this, you’d think what the heck, but… yeah, this is Zone alright.New user option 'zone-delete-other-windows'.When non-nil, the frame is made into a single full frame window to holdthe zoned buffer. If all frames were to be used ('zone-all-frames' setto non-nil), then all frames are converted to single window frames.New user option 'zone-all-frames'.When non-nil, Zone will appear on all visible frames. While the bufferscrambling will appear on each frame, it will be the same buffer so theywill all behave the same way.New user option 'zone-all-windows-in-frame'.When non-nil, the zoned buffer will be mapped to all of the windowspresent on the frame. If the option is nil, then only the selectedwindow will show the zoned buffer. Note, however, that each windowholding the zoned buffer is showing the same zoned buffer.New variable 'zone-ignored-buffers'.This variable is a list of criteria for excluding a buffer fromconsideration as the source of zoning. The list has entries that aretested against each buffer until a suitable one is found. The criteriacan be a symbol whose name ends in "-mode" which excludes buffers thatare in a mode derived from the specified mode. It may also be afunction-bound symbol or anonymous function (lambda expression) that iscalled with a buffer that returns a non-nil value if it should not bethe Zone source. Finally, an entry can also be a regular expressionthat must not match the buffer's name.Initially, the list excludes buffers in 'special-mode', in 'image-mode',containing an encrypted file, is empty, is hidden, or is the "*scratch*"buffer. If it cannot locate any acceptable buffers, it willbegrudgingly use the "*scratch*" buffer.Sometimes I wonder what prompts people to build out all this elaborate complexity for a screensaver that ostensibly exactly no one would ever really get to sit at and admire for any length of time. But that’s Emacs for you.Abbrev modeAbbrevs are little word auto corrections you can set up. See Correcting Typos and Misspellings with Abbrev.You can now enable Abbrev mode by default using Easy Customization.Customize the user option 'abbrev-mode' to non-nil to enable Abbrev modeby default in all buffers.Antlr modeFor writing language grammars for the ANTLR tool.Variable 'antlr-tool-version' is no longer a user option.It is now buffer-local and has the symbol 'antlr-v2', 'antlr-v3' or'antlr-v4' as its value. The value determines which of the toolversion-dependent customization options are used. For example, thecommand 'antlr-run-tool' uses the option 'antlr-v3-tool-command' (withdefault value "java org.antlr.Tool") when 'antlr-tool-version' has thevalue 'antlr-v3'.'antlr-mode' now also works on ANTLR v3 or v4 grammars.If the variable 'antlr-tool-version' is not set locally, e.g., by thefile's local variables specs, the command sets its local value to'antlr-v2' if a keyword "class" or "header" appears at the beginning ofthe source, or to 'antlr-v3' otherwise.New 'antlr-v4-mode' is a derived mode of 'antlr-mode'.It sets 'antlr-tool-version' to value 'antlr-v4', and is automaticallyused for files with extension ".g4".The variable 'antlr-language' is now used more generally.The variable's value is a symbol which determines which of thelanguage-dependent customization options are used. These optionsinfluence font-locking and indentation commands. Its value is usuallyset according to the grammar option "language", see the default valuesof 'antlr-v2-language-list', 'antlr-v3-language-list' and'antlr-v4-language-list'. This mode now supports C, Delphi, JavaScript,ObjC, Python and Ruby, in addition to Java and C++.New user option 'antlr-run-tool-on-buffer-file'.The command 'antlr-run-tool' now usually runs on the file for thecurrent buffer. Customize this user option to nil to get the previousbehavior back.Hi LockHi-Lock or “Highlighting” (see Highlighting by Word, Line and Regexp) is a cool feature that highlights stuff based on words, regexp, etc.It’s called “lock” because font locking is how you syntax highlight, and hi locking is therefore the highlighter equivalent of that.The active region is used for default values in more functions.If an active region exists, the commands 'hi-lock-line-face-buffer' and'hi-lock-face-phrase-buffer' now use its contents as their defaultvalue. Previously, only 'hi-lock-face-buffer' supported this.ShadowfileObscure Emacs feature that maintains copies of files you edit in other places.'shadow-info-buffer' and 'shadow-todo-buffer' now use ephemeral buffer names.Display Battery modeFor laptop users or people with fantastically complex battery-backed desktops and servers.UPower battery status can update automatically without polling.On systems where the user option 'battery-status-function' is set to'battery-upower', it is now possible to get battery status updates onthe mode line without polling for changes every'battery-update-interval' seconds. Setting this user option to nilmeans the mode line will update only when the battery power state,percentage, or presence in the bay changes.Etags Regen modeThe tags table is no longer created during completion.Previously, when there was no tags table loaded and the defaultcompletion function was called, 'etags-regen-mode' ensured that tagswere created. This has been disabled, and the new user option'etags-regen-create-on-completion' can be used to enable it again.Miscellaneous'tooltip-mode' now shows tooltips on TTY frames after a delay.Display of tooltips on text-only terminals now happens after'tooltip-delay', as it already did on GUI terminals. To get back theold behavior, customize the value of 'tooltip-delay' to zero.New user option 'follow-mode-prefix-key'.This user option replaces 'follow-mode-prefix', which had to be setbefore loading Follow mode. This new option allows you to change theprefix even after it was loaded, using 'customize-option' or 'setopt'.cdl.el is now obsolete.Use 'shell-command' and 'shell-command-on-region' instead.echistory.el is now obsolete.hashcash.el is now obsolete.It is believed to no longer be useful as a method to fight spam.kermit.el is now obsolete.New user option 'ns-click-through' on Nextstep (GNUstep/Mac OS).This controls whether activation clicks are passed through to Emacscommands. When nil, clicking on an inactive Emacs frame will onlyactivate it. When t (the default), the click will both activate theframe and be interpreted as a command.New user option 'global-hl-line-buffers'.This specifies the buffers in which 'global-hl-line-mode' should beswitched on. The default is all buffers except the minibuffer, andbuffers that enable 'cursor-face-highlight-mode', like the"*Completions*" buffer.New value 'window' for the user option 'global-hl-line-sticky-flag'.Unlike the value t that highlights the line containing point, ithighlights the line with the window's point. Also it uses the new face'hl-line-nonselected' for highlighting the line with the window's pointin non-selected windows.New user option 'display-fill-column-indicator-warning'.Customize it to a non-nil value to have the fill-column indicatorschange their face if the current line exceeds the 'fill-column'. Thenew face 'display-fill-column-indicator-warning-face' is used tohighlight the fill-column indicators. By default, this is disabled.New function 'flash-face-bell-function'.This function flashes a face briefly.It is intended to be used in 'ring-bell-function'.New function 'flash-echo-area-bell-function'.This function flashes the current frame's echo area briefly.It is intended to be used in 'ring-bell-function'.New user option 'flash-face-faces'.This option tells 'flash-face-bell-function' which faces should flash.New user option 'flash-face-attributes'.This option tells 'flash-face-bell-function' and'flash-echo-area-bell-function' which face attributes should be usedto flash.'face-all-attributes' now accepts an optional argument INHERIT.It has the same meaning as the INHERIT argument to 'face-attribute',which already takes this argument for a single attribute. This isuseful when you want the face attributes to be absolute and not'unspecified'.New user option 'ffap-prefer-remote-file'.If non-nil, FFAP always finds remote files in buffers with remote'default-directory'. If nil, FFAP finds local files first for absolutefile names in those buffers. The default is nil.New theme 'newcomers-presets'.This new theme configures user options and minor modes that mightinterest new users, but would otherwise be too invasive to enable bydefault. It is basically a set of alternative defaults. (An Emacstheme is a generic collection of settings, and need not affect Emacs'sappearance.) See the Info node "(emacs) Newcomers Theme" for moreinformation.Shame this got buried all the way at the bottom. This is a subject that has been debated to death, again and again, on mailing lists and elsewhere.Should Emacs have better defaults? Which of course is a loaded question because it does change, and it has absolutely improved its defaults. Fire up a copy of Emacs 21 and Emacs 31 without mods and daily drive them for a day and see what I mean by that.But anyway. Yes, this is a good thing. It does not affect Emacs veterans (though I’m sure curmudgeons will find a way of claiming it does) and newbies can activate a mode that will give them slightly saner defaults out of the box.So what does it do then? It enables a bunch of incredibly conservative features that, honestly, should be the default already. Like electric pair mode (auto-insert closing braces and quotes, that sort of thing); saving the history of completions you’ve made; display line numbers and enable flymake. And a smattering of not terribly interesting long tail of changes most people (certainly not newbies) would have much of an opinion about.This speaks to the conservatism of the maintainers who made collectively arrived at these decisions, or perhaps… the absence of changes you can reasonably make to make a newbie’s life easier.My view is on the latter. Emacs is already in a pretty good place, but Emacs is an advanced tool. No amount of turning stuff on or off will ever change that.'report-emacs-bug' now checks whether the bug report is about Org.The command 'report-emacs-bug' looks in the report text for symbols thatindicate problems in Org, and if found, will ask whether the bug reportis actually about Org (in which case users should use the Org-specificcommand for reporting bugs).The elint.el package is now obsolete.Use the byte-compiler instead; it provides more and more useful warnings.New Modes and Packages in Emacs 31.1New major mode 'icalendar-mode'.A major mode for displaying and editing iCalendar (RFC 5545) data. Thismode handles line unfolding and fontification, including highlightingsyntax errors in invalid data.New minor mode 'delete-trailing-whitespace-mode'.A simple buffer-local mode that runs 'delete-trailing-whitespace'before saving the buffer.A minor mode that does something a lot of people end up hand-building themselves.New major mode 'conf-npmrc-mode'.A major mode based on 'conf-mode' for editing ".npmrc" files.New major modes based on the tree-sitter libraryNew major mode 'mhtml-ts-mode'.An optional major mode based on the tree-sitter library for editing HTMLfiles. This mode handles indentation, fontification, and commenting forembedded JavaScript and CSS.New major mode 'go-work-ts-mode'.A major mode based on the tree-sitter library for editing "go.work"files. If tree-sitter is properly set-up by the user, it can beenabled for files named "go.work".New package 'lua-mode'.The 'lua-mode' package from NonGNU ELPA is now included in Emacs.New library 'timeout'.This library provides functions to throttle or debounce Emacs Lispfunctions. This is useful for corralling overeager code that is slowand blocks Emacs, or does not provide ways to limit how often it runs.New mode 'system-taskbar-mode'.This is a global minor mode and companion functions that integrate Emacswith system GUI taskbars (also called docks or launchers or somethingsimilar) to display a taskbar icon badge overlay, a progress bar reportoverlay, and alerts that an Emacs session needs attention, often byflashing or bouncing the Emacs application icon. Supported on GNU/Linuxvia D-Bus, macOS/GNUstep 10.5+ and MS-Windows 7+.On GNU/Linux systems, shell extensions or similar helpers such as"dash-to-dock" may be required. See and.Hey that’s pretty neat. I don’t use a WM where that makes a difference to me, I don’t think (I use Hyprland) but I’d love to hear from people who do use it, and if it helps.New package 'system-sleep'.This package provides platform-neutral interfaces to block your systemfrom entering idle sleep and a hook to process pre-sleep and post-wakeevents. You can use this to avoid the system entering an idle sleepstate and interrupting a long-running process due to a lack of useractivity. The sleep event hook can, for example, close externalconnections or serial ports before sleeping, and re-establish them whenthe system wakes up.Supported on GNU/Linux via D-Bus (sleep blocking and sleep eventsrequire the org.freedesktop.login1 service, display sleep blockingrequires org.freedesktop.Screensaver service), macOS (sleep/displayblocking requires version 10.9 or later, sleep events are supported onall versions), MS-Windows (sleep blocking is supported on all versions,sleep events require Windows 8 or later).Incompatible Lisp Changes in Emacs 31.1Boundaries of 'cursor-sensor-functions' now obey stickiness.'cursor-sensor-mode' now uses 'get-pos-property' to decide whether aboundary is considered to be inside or outside.This means that by default, the boundaries have changed: the endposition of a stretch of a 'cursor-sensor-functions' text property usedto be considered outside of the stretch whereas it is now considered tobe inside. You can recover the previous behavior by controlling thestickiness, for example with a call like: (add-text-properties BEG END '(cursor-sensor-functions (MY-FUNCTION) rear-nonsticky (cursor-sensor-functions)))'makunbound' on a variable alias undoes the alias.Previously, it had the effect of applying the 'makunbound' to the targetof the alias (which can fail for some builtin variables).'FOO-ts-mode-indent-offset' renamed to 'FOO-ts-indent-offset'.When the new TS modes were introduced, a mistake was made where thosemodes used 'FOO-mode-indent-offset' instead of the conventional'FOO-indent-offset'. The following are the new names:'toml-ts-indent-offset', 'mhtml-ts-js-css-indent-offset','html-ts-indent-offset', 'typescript-ts-indent-offset','php-ts-indent-offset', 'php-ts-html-indent-offset','json-ts-indent-offset', 'java-ts-indent-offset','go-ts-indent-offset', 'csharp-ts-indent-offset','cmake-ts-indent-offset', 'c-ts-indent-offset'.String mutation has been restricted further.'aset' on unibyte strings now requires the new character to be a singlebyte (0-255). On multibyte strings the new character and the characterbeing replaced must both be ASCII (0-127).These rules ensure that mutation will never transform a unibyte stringto multibyte, and that the size of a string in bytes (as reported by'string-bytes') never changes. They also allow strings to berepresented more efficiently in the future.Other functions that use 'aset' to modify string data, such as'subst-char-in-string' with a non-nil INPLACE argument, will signal anerror if called with arguments that would violate these rules.More program constants are combined by the compiler.The compiler now unifies more constants that are 'equal' for better codegeneration. This does not affect correct programs but may expose somecoding mistakes. For example, (eq (cdr '(1 2 3)) '(2 3))may return either nil or t.Nested backquotes are no longer supported in Pcase patterns.The obsolete variable 'redisplay-dont-pause' has been removed.The 'rx' category name 'chinese-two-byte' must now be spelled correctly.An old alternative name (without the first 'e') has been removed.'text-property-default-nonsticky' is now buffer-local.This variable now becomes buffer-local when set. Use 'setq-default' inthe (unlikely) case you want to change the global value.All the digit characters now have the 'digit' category.All the characters whose Unicode general-category is Nd now have the'digit' category, whose mnemonic is '6'. This includes both ASCII andnon-ASCII digit characters.All the symbol characters now have the 'symbol' category.All the characters that belong to the 'symbol' script (according to'char-script-table') now have the 'symbol' category, whose mnemonic is'5' (it looks like an 'S').Some libraries obsolete since Emacs 24.4 and 24.5 have been removed:cc-compat.el, info-edit.el, meese.el, otodo-mode.el, rcompile.el,sup-mouse.el, terminal.el, vi.el, vip.el, ws-mode.el, and yow.el.'if-let' and 'when-let' are now obsolete.Use 'if-let*', 'when-let*' and 'and-let*' instead.This effectively obsoletes the old '(if-let (SYMBOL SOMETHING) ...)'single binding syntax, which we'd kept only for backwards compatibility.Sigh.. more unnecessary obsolescence churn, all because of some chicanery in a few extreme cases where the macros didn’t do what people thought it did.The Eshell 'pwd' command now expands the directory name on all systems.This ensures that user directories are properly expanded to their fullname. Previously, Eshell only did this for MS-Windows systems. Torestore the old behavior, you can set 'eshell-pwd-convert-function' to'identity'.The rx 'eval' form now uses the current Lisp dialect for evaluation.Previously, its argument was always evaluated using dynamic binding.Unused block comment variables have been removed.The unused variables 'block-comment-start' and 'block-comment-end',which never actually had any effect when set by major modes, have beenremoved.'delete-frame' now needs a non-nil FORCE to delete the daemon frame.The initial terminal frame of an Emacs process running as daemon can bedeleted via 'delete-frame' if and only if its optional FORCE argument isnon-nil.'date-to-time' no longer accepts malformed times with time zone like "EDT".Time strings like "2025-06-04T13:21:00 EDT" are not in valid ISO 8601time format, and 'date-to-time' now signals an error for them. Use anumerical time-zone specification, like "2025-06-04T13:21:00-0400",instead, which gives the time offset as +/-hh or +/-hh:mm. A designator"Z" for UTC time is also supported. Less formal space-separated timeformats, like "2025-06-04 13:21:00 EDT", without the ISO 8601 "T"separator, are also supported.The obsolete variable 'load-convert-to-unibyte' has been removed.The experimental variable 'binary-as-unsigned' has been removed.Instead of '(let ((binary-as-unsigned t)) (format "%x" N))' you can use'(format "%x" (logand N MASK))' where MASK is for the desired word size,e.g., #x3fffffffffffffff for typical Emacs fixnums.The 'exec-path' variable now uses same default PATH as other programs.That is, if the PATH environment variable is unset or empty, 'exec-path'now acts as if PATH is the system default, which is "/bin:/usr/bin"on GNU/Linux systems.New variable 'tty-cursor-movement-use-TAB-BS'.The display optimization where the combination 'TAB' characters +'BACKSPACE' is used to move to a position on a TTY frame is now disabledby default and controlled by this variable; it can be set to non-nilto keep the old behavior. This change is to accommodate screenreaders.'next-completion' and 'previous-completion' now use 'completions-format'.Previously, these commands only took horizontal format into account;now, they call either '{next,previous}-line-completion' or the newcommands '{next,previous}-column-completion', depending on the value of'completions-format'. The latter two commands improve and extend theprevious implementations of '{next,previous}-completion', which betterreflect that they only take the (default) horizontal completions formatinto account. Any external code using '{next,previous}-completion' thatassumes the previous implementation must be adjusted accordingly; see'minibuffer-next-completion' for an example of such an adjustment inEmacs core.A thread's current buffer can now be killed.We introduce a new attribute for threads called "buffer disposition".See the new argument in 'make-thread' as well as the'thread-buffer-disposition' and 'thread-set-buffer-disposition' functions.The default value allows the thread's current buffer to be killed by anotherthread. This does not apply to the main thread's buffer.Defining or modifying a face so that it inherits from itself signals error.Calling any function that defines or modifies a face in a way thatcauses cyclical inheritance (i.e., the face inherits from itself, eitherdirectly or indirectly) now signals an error. Previously, Lisp programscould get away with this, and the problem would either be detected atdisplay time or even cause Emacs to hang trying to display such a face.Affected APIs include 'defface', 'set-face-attribute', their callers,and other similar functions.Original behavior of 'overlays-in' and 'overlays-at' has been restored.Before Emacs 28.1, the list of overlays returned by these two functionsincluded overlays outside of the current narrowing of the buffer, andthere wasn't a special exception for including empty overlays at end ofaccessible portion of the buffer. This behavior has been restored, andthe special behavior for empty overlays is again reserved only to theactual end of buffer, disregarding narrowing. As result,'remove-overlays' can now again remove overlays outside of thenarrowing, as it did before Emacs 28.1.'help-setup-xref' now re-enables the major mode of the Help buffer.As a result, in many cases the buffer will be read-only afterwards.This should not cause any trouble as long as the actual buffermodification takes place inside 'with-help-window' or'with-output-to-temp-buffer' after the call to 'help-setup-xref'.Xref commands don't automatically suggest visiting a tags table anymore.When no tags file is loaded, symbol completion now just won't provideany suggestions. Thus, so the 'M-?' command now works without a tagstable. And the 'M-.' command will show a message describing the severalbuilt-in options that will provide an Xref backend when used.Calling 'debug' in batch sessions no longer kills Emacs.If you want Emacs to exit, your program will now have to call'kill-emacs' explicitly.Lisp Changes in Emacs 31.1The API to manipulate error descriptors has been improved.There are new functions: 'error-type-p', 'error-type','error-has-type-p', and 'error-slot-value'. You can now say '(signalerr)' instead of '(signal (car err) (cdr err))', which is not only moreconcise, but also preserves the equality (under 'eq') of the errordescriptor.'secure-hash' now supports generating SHA-3 message digests.The list returned by 'secure-hash-algorithms' now contains the symbols'sha3-224', 'sha3-256', 'sha3-384', and 'sha3-512'. These symbols canbe used as the ALGORITHM argument of 'secure-hash' to generate SHA-3hashes.New function 'garbage-collect-heapsize'.Same as 'garbage-collect' but just returns the info from the last GCwithout performing a collection.Improve 'replace-region-contents' to accept more forms of sources.It has been moved from subr-x.el to editfns.c. You can now directlypass it a string or a buffer rather than a function. Passing a functionis now deprecated.New function 'char-displayable-on-frame-p'.'char-displayable-on-frame-p' returns non-nil if Emacs ought to be ableto display its char argument on a given frame. This new function,unlike 'char-displayable-p', does not check whether the character can beencoded by the underlying terminal.New function 'frame-initial-p'.This predicate returns non-nil if a given frame or terminal is or holds,respectively, the initial text frame that is used internally duringdaemon mode, batch mode, and the early stages of startup. Interactiveand graphical programs, for instance, can use this predicate to avoidoperating on the initial frame, which is never displayed.New macros 'static-when' and 'static-unless'.Like 'static-if', these macros evaluate their condition atmacro-expansion time and are useful for writing code that can workacross different Emacs versions.New feature to speed up repeated lookup of Lisp files in 'load-path'.If the new variable 'load-path-filter-function' is set to the newfunction 'load-path-filter-cache-directory-files', calling 'load' willcache the directories it scans and their files, and the followinglookups should be faster.'let-alist' supports indexing into lists.The macro 'let-alist' now interprets symbols containing numbers as listindices. For example, '.key.0' looks up 'key' in the alist and thenreturns its first element.Lexical bindingYou can change the default value of 'lexical-binding'.While the default is still the use of dynamic binding dialect of EmacsLisp in those places that don't explicitly set 'lexical-binding', youcan change it globally with: (set-default-toplevel-value 'lexical-binding t)But don’t do that. Lexical binding is great; it’s the future; we have dynamic binding forever for special forms like defvar so most things just work as they should. But don’t go enabling this. Let package authors update their code in their own time.Loading a file displays a warning if there is no 'lexical-binding' cookie.Files loaded from '-x' and '--script' now use lexical binding.If you don't have time to adapt your script's code to the lexicalbinding dialect (see "(elisp) Converting to Lexical Binding"), you canwrap your code in: #!/usr/bin/env -S emacs --batch --script (eval '(progn YOUR CODE HERE))Huh I thought they already used lexical binding.New function 'set-local'.This is the buffer-local equivalent of the function 'set'.New macro 'setopt-local'.This is the buffer-local version of 'setopt' for user options ratherthan plain variables, and uses 'custom-set'/'set-local' to set variablevalues. A new argument, BUFFER-LOCAL, is passed to 'custom-set'functions to indicate the buffer-local context.New macros 'incf' and 'decf'.They increment or decrement the value stored in a variable (a symbol),or in a generalized variable.New functions 'plusp' and 'minusp'.They return non-nil if a number is positive or negative, respectively,and signal an error if they are given a non-number.New functions 'oddp' and 'evenp'.They return non-nil if an integer is odd or even, respectively, andsignal an error if they are given a non-integer.New functions 'drop-while' and 'take-while'.These work like 'drop' and 'take' but use a predicate instead ofcounting.New function 'all' and function alias 'any'.These return non-nil for lists where all and any elements, respectively,satisfy a given predicate.'equal' now compares circular lists without signalling an error.Comparing very deeply nested objects will still fail, but 'equal'will no longer signal the 'circular-list' error.The 'defvar-local' macro's second argument is now optional.This means that you can now call it with just one argument, like'defvar', to declare a variable both special and buffer-local.The rx atom 'any' is obsolete and usage emits warnings.When used as an atom, 'any' is an old alias for 'not-newline' but isoften mistakenly used where 'anychar' was intended. Note that theconstruct '(any ...)' is unrelated and not obsolete.ERTERT is Emacs’s elisp test framework.Some experimental ERT macros are now considered stable.The following macros, previously only available in the experimental'ert-x' module, are now considered stable and have been moved to 'ert':- 'ert-with-test-buffer'- 'ert-with-buffer-selected'- 'ert-with-buffer-renamed'See "(ert) Helper Functions" node in the ERT manual for more information.New function 'ert-play-keys'.Previously, 'ert-simulate-keys' could be used for sending keys to inputfunctions such as 'read-from-minibuffer', but not for other interactiveinput such as starting key-mapped commands.Show executed tests from erts files via the ERT results buffer.For tests that call 'ert-test-erts-file', the ERT results buffer nowallows you to list the tests defined in the referenced erts files thathave been executed by the test at point. See Info node "(ert) RunningTests Interactively" for more information.Time & Date'seconds-to-string' supports new formatting options.Optional arguments are provided to produce human-readable time-durationstrings in a variety of formats, for example "6 months 3 weeks" or "5m52.5s".New function 'hash-table-contains-p'.This function returns non-nil if a given key is present in a hash table.The function 'purecopy' is now an obsolete alias for 'identity'.New function 'native-compile-directory'.This function natively compiles all Lisp files in a directory and in itssub-directories, recursively, excluding those already natively compiled.New function 'color-blend'.This function takes two RGB lists and optional ALPHA and returns an RGBlist whose elements are blended in linear space proportional to ALPHA.New function 'dom-inner-text'.This function gets all the text within a DOM node recursively, returningit as a concatenated string. It replaces the now-obsolete functions'dom-text' and 'dom-texts'.The obsolete face attribute ':reverse-video' has been removed.Use ':inverse-video' instead.D-BusD-Bus is a generic mechanism for inter-application and app-OS communication on Linux.Support interactive D-Bus authorization.A new ':authorizable t' parameter has been added to 'dbus-call-method'and 'dbus-call-method-asynchronously' to allow the user to interactivelyauthorize the invoked D-Bus method (for example via polkit).Support D-Bus file descriptor manipulation.A new ':keep-fd' parameter has been added to 'dbus-call-method' and'dbus-call-method-asynchronously' to instruct D-Bus to keep a filedescriptor, which has been returned by a method call, internally. Thefunctions 'dbus--fd-open', 'dbus--fd-close' and 'dbus--registered-fds'implement managing these file descriptors. See the Info node "(dbus)File Descriptors" for details.The customization group 'wp' has been removed.It has been obsolete since Emacs 26.1. Use the group 'text' instead.New optional BUFFER argument for 'string-pixel-width'.If supplied, 'string-pixel-width' will use any face remappings fromBUFFER when computing the string's width.New function 'truncate-string-pixelwise'.This function truncates a string to the specified maximum number ofpixels rather than by characters, as in 'truncate-string-to-width', andrespects face remappings if BUFFER is specified. You can also specifyan optional ellipsis string to append, similar to'truncate-string-to-width'.New macro 'with-work-buffer'.This macro is similar to the already existing macro 'with-temp-buffer',except that it does not allocate a new temporary buffer on each call,but tries to reuse those previously allocated (up to a number defined bythe new variable 'work-buffer-limit', which defaults to 10).'date-to-time' now defaults to local time.The function now assumes local time instead of Universal Time whenits argument lacks explicit time zone information. This has been thede-facto behavior since Emacs 24 although documentation said otherwise.Also, the fallback on 'timezone-make-date-arpa-standard' has beenremoved because its supported date styles can be handled by'parse-time-string'. To restore the previously documented behavior,specify "+0000" or "Z" as the time zone in the argument.The 'min-width' property is now supported for overlays as well.This 'display' property was previously supported only as text property.Now overlays can also have this property, with the same effect for thetext covered by the overlay.New function 'remove-display-text-property'.This function removes a display property from the specified region oftext, preserving any other display properties already set for thatregion.New macro 'cond*'.The new macro 'cond*' is an alternative to 'cond' and 'pcase'.Like them, it can be used to define several clauses, each one with itsown condition; the first clause that matches will cause its body to beevaluated.'cond*' can use Pcase's pattern matching syntax and also providesanother pattern matching syntax that is different from that of 'pcase',which some users might find less cryptic.See the Info node "(elisp) cond* Macro" for details.I’m not going to get into if we need or want cond*, but I do feel we need a better cond — but cond* is just a far more complex, in my opinion, way of doing something pcase can already do well.New function 'shell-command-do-open'.This lets a Lisp program access the core functionality of the'dired-do-open' command. It opens a file or files using an externalprogram, choosing the program according to the operating system'sconventions.'make-vtable' can create an empty vtable.It is now possible to create a vtable without data, by leaving the':objects' list empty, or by providing an ':objects-function' that(initially) produces no data. In such a case, it is necessary toprovide a ':columns' spec, so that the number of columns and theirwidths can be determined. Column widths can be set explicitly, or theywill be calculated based on the window width.New symbol property 'repeat-continue' for 'repeat-mode'.A command with the 'repeat-continue' symbol property, which can be alist of keymaps or t, will continue an already active repeating sequencefor a keymap in that list (resp. all keymaps). The new property doesnot affect whether the command starts a repeating sequence, whichremains governed by the 'repeat-map' property. 'defvar-keymap' supportsa new keyword ':continue', a list of commands, and adds the keymap tothe 'repeat-continue' property of each command in that list. The'use-package' and 'bind-keys' macros support a similar keyword':continue-only'.New function 'completion-table-with-metadata'.It offers a more concise way to create a completion table with metadata.'all-completions' and 'unintern' no longer support old calling conventions.New symbol property 'find-function-type-alist'.Used by 'find-function' and similar commands. Macros that define anobject in a way that makes it hard to associate the object's name withthe macro call site defining the object can add an entry to the property'find-function-type-alist' on the object's name to provide informationfor finding the definition.The new convenience function 'find-function-update-type-alist' offers aconcise way to update a symbol's 'find-function-type-alist' property.New function variable 'comment-setup-function' for multi-language modes.It can set comment-related variables such as 'comment-start' dependingon the language under point.Required for any language that embed other languages. So mostly of use for tree-sitter major modes or stuff like the web-mode package.'inhibit-message' can now inhibit clearing of the echo area.Binding 'inhibit-message' to a non-nil value will now suppress boththe display of messages and the clearing of the echo area, such ascaused by calling 'message' with a nil argument.'minibuffer-message' no longer blocks while displaying message.'minibuffer-message' now uses a timer to clear the message printed tothe minibuffer, instead of waiting with 'sit-for' and then clearing it.This makes 'minibuffer-message' usable in Lisp programs which want toprint a message and then continue to perform work.Special EventsNew primitive 'insert-special-event'.This function inserts the special EVENT into the input event queue.New event type 'sleep-event'.This event is sent when the device running Emacs enters or leaves thesleep state.Function aliases obsolete since Emacs 23.2 have been removed:'advertised-undo', 'advertised-widget-backward', and'dired-advertised-find-file'.New functions to get and set top-level buffer-local values.'buffer-local-toplevel-value' and 'set-buffer-local-toplevel-value' getand set the top-level buffer-local value of a variable. A top-levelvalue is the one that variable has outside of any let-bindings.New function 'exec-suffixes'.This function by default returns the value of the corresponding useroption, but can optionally return the equivalent of 'exec-suffixes' froma remote host. It must be used in conjunction with the function'exec-path'.'read-directory-name' now accepts an optional PREDICATE argument.JSON parse error line and column are now obsolete.The column number is no longer available; the line number will beremoved in the next release of Emacs.'defvar-keymap' can now take a ':prefix t' option.This is an abbreviation for using the name of the keymap as the prefixcommand name. E.g., '(defvar-keymap foo-map :prefix t)' is equivalentto '(defvar-keymap foo-map :prefix 'foo-map)'.New 'R' code letter for 'interactive' forms.This specifies the beginning and end of an active region, and nil twiceif the region is inactive. The interactive specification (interactive "R")is equivalent to (interactive (list (use-region-beginning) (use-region-end)))ToolkitThe Emacs PGTK toolkit respects dark and light modes.Emacs when built with the pure GTK toolkit now respects desktop dark andlight modes for drawing the GTK toolbar and widgets, automaticallytoggling between them.That’s lovely for people who love toggling between it and want their OS to govern this.'toolkit-theme-set-functions' called when the toolkit theme is set for Emacs.When the theme is set on PGTK, Android, or MS-Windows systems,'toolkit-theme-set-functions' is called. The result is stored in thevariable 'toolkit-theme' as either symbol 'dark' or 'light', but may beextended to encompass other toolkit-specific symbols in the future.Progress reporter context.'make-progress-reporter' now accepts the optional argument CONTEXT,which if it is the symbol 'async', inhibits updates in the echo areawhen it is busy. This is useful, for example, if you want to monitorprogress of an inherently asynchronous command such as 'compile'.Binary format specifications '%b' and '%B' added.These produce the binary representation of a number. '%#b' and '%#B'prefix the bits with '0b' and '0B', respectively.'pp-eval-expression' can now insert results into the current buffer.With a prefix argument, 'pp-eval-expression' inserts the result into thecurrent buffer, just like 'eval-expression' already did.New function 'multiple-command-partition-arguments'.This function partitions a list of command arguments that might bearbitrarily long. It can be used in cases in which it is known to besafe to run the command multiple times on subsequent partitions of thelist of arguments. The variable 'command-line-max-length' controls thepartitioning.New function 'ensure-proper-list'.This function is a variation on 'ensure-list' that checks if an objectis a proper list, in which case the list will be returned as is,otherwise the function will return the object wrapped in a singletonlist.In batch mode, 'C-c' (i.e. SIGINT) can either 'quit' or kill Emacs.By default it kills Emacs, as before, but 'kill-emacs-on-sigint'can be set to nil to change that.The response to SIGINT in interactive sessions is unaffected,e.g., in a normal GUI session it still kills Emacs whereas in a terminalit causes 'quit' since it is used for 'C-g'.New ':interactive-only' way to add an advice.While it is marginally more efficient than ':after' or ':before',the main purpose is to make the intention more obvious when the advicemodifies only the interactive form and not the actual behaviorof the function.Changes in Emacs 31.1 on Non-Free Operating SystemsSupport macOS Accessibility Zoom focus tracking.This is an important change for visually-impaired users. If macOSAccessibility Zoom is enabled via (System Settings, Accessibility,Zoom...) with keyboard focus tracking (Advanced...), Zoom is informedof updated cursor positions during each redisplay cycle.New macOS function 'ns-process-is-accessibility-trusted'.This function returns t if the macOS Accessibility Framework trustsEmacs. This is a necessary condition for Accessibility Zoom and otheraccessibility features. Enable Emacs via (System Settings, Privacy &Security, Accessibility...) and add the Emacs.app installed directory tothe enabled application list.Process execution has been optimized on Android.The run-time performance of subprocesses on recent Android releases,where a userspace executable loader is required, has been optimized onsystems featuring Linux 3.5.0 and above.It is now possible to read GUI events from non-main Lisp threads on Android.Put differently, this enables input events to be read and recursiveediting sessions to be started from non-main threads. The only platformwhere this remains unsupported is Nextstep (GNUstep or macOS).'desktop-restore-frames' has been disabled by default on Android systems.Restrictions imposed on clients by the window manager on these systemsare too prohibitive and don't allow restoring frame configurations.(For the same reason many window management facilities are also notimplemented by Emacs.)Emacs responds to runtime display configuration changes on Android.The upshot of this is that Emacs will adapt to display resolution /layout changes applied while an Emacs session is active, which ispossible on some recently released devices.'NSSpeechRecognitionUsageDescription' now included in "Info.plist" (macOS).Should Emacs (or any built-in shell) invoke a process using macOS speechrecognition APIs, the relevant permission dialog is now displayed, thusallowing Emacs users access to speech recognition utilities.Note: Accepting this permission allows the use of system APIs, which maysend user data to Apple's speech recognition servers.Re-introduced dictation, lost in Emacs 30 (macOS).We lost macOS dictation in Emacs 30 when migrating to NSTextInputClient.We have now implemented 'selectedRange' in 'nsterm.m' to enable it inthe new subsystem. You may notice a slight change in dictation UIprovided by macOS.On Mac OS X, stipples now render with color.Emacs on MS-Windows now supports GUI dialogs and message boxes better.In particular, it is now possible to show text with embedded newlines ina dialog popped by 'message-box'. This is supported on Windows Vistaand later versions.Emacs on MS-Windows now supports drag-n-drop of text into a buffer.This is in addition to drag-n-drop of files, which was alreadysupported. As on X, the user options 'dnd-scroll-margin' and'dnd-indicate-insertion-point' can be used to customize the process.Emacs on MS-Windows now supports color fonts.On Windows 8.1 and later versions, Emacs now uses DirectWrite to drawtext, which supports color fonts. This can be disabled by setting thevariable 'w32-inhibit-dwrite' to t. Also see 'w32-dwrite-available' and'w32-dwrite-reinit' to check availability and to configure theDirectWrite rendering parameters.To show color Emojis in Emacs, customize the default fontset to use acolor Emoji font installed on your system for the 'emoji' script.Emacs on MS-Windows now supports 'yank-media'.This command inserts clipboard data of different formats into thecurrent buffer, if the major mode supports it.Emacs on MS-Windows now supports up to 1024 sub-processes.Changes in implementation of monitoring sub-processes allow Emacs onMS-Windows to start up to 1024 sub-processes, similar to GNU/Linux andother free systems.Images on MS-Windows now support the ':transform-smoothing' flag.Transformed images are smoothed using the bilinear interpolation bymeans of the GDI+ library.Emacs on MS-Windows is now capable of exporting frame screenshots to files.The new primitive 'w32-export-frame' can be used to export a screenshotof a specified frame to an image file in one of the supported imageformats, such as JPEG or PNG.Emacs on MS-Windows now supports the ':data' keyword for 'play-sound'.In addition to ':file FILE' for playing a sound from a file, ':dataDATA' can now be used to play a sound from memory.New primitive 'w32-sound-volume'.This primitive allows getting and setting the volume of the system'sdefault audio device (or the "optimal device", if there are severaldevices).The MS-DOS port of Emacs now supports more recent releases of GCC and Binutils.Accordingly, we have revised our recommendations for a suitable DJGPPtoolchain to GCC 14.2.0 and Binutils 2.35.1 in lieu of GCC 3.4.x andBinutils 2.26.Windows Terminal can now display 256 and 24-bit RGB color.Previously, terminal sessions on Windows supported display of 16 colors.There is now support for 8-bit (256 color) and 24-bit RGB (true color).The new mechanism will be enabled automatically when supported.It defaults to 24-bit RGB color, but can be set to 8, 16, '8bit', or'24bit' by passing the '--color' flag or setting the 'tty-color-mode'frame parameter. Use of the new mechanism is controlled by an internalvariable that can be set and inspected via the functions'w32-use-virtual-terminal' and 'w32-use-virtual-terminal-p'(respectively). See the manual entry "(emacs) Windows Misc" for moredetails.