GNU Emacs NEWS -- history of user-visible changes. Copyright (C) 2022-2023 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'. If possible, use 'M-x report-emacs-bug'. This file is about changes in Emacs version 30. See file HISTORY for a list of GNU Emacs versions and release dates. See files NEWS.29, NEWS.28, ..., NEWS.18, and NEWS.1-17 for changes in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. Temporary note: +++ indicates that all relevant manuals in doc/ have been updated. --- means no change in the manuals is needed. When you add a new item, use the appropriate mark if you are sure it applies, and please also update docstrings as needed. * Installation Changes in Emacs 30.1 * Startup Changes in Emacs 30.1 * Changes in Emacs 30.1 ** X selection requests are now handled much faster and asynchronously. This means it should be less necessary to disable the likes of 'select-active-regions' when Emacs is running over a slow network connection. ** Emacs now updates invisible frames that are made visible by a compositor. If an invisible or an iconified frame is shown to the user by the compositing manager, Emacs will now redisplay such a frame even though 'frame-visible-p' returns nil or 'icon' for it. This can happen, for example, as part of preview for iconified frames. +++ ** 'write-region-inhibit-fsync' now defaults to t in interactive mode, as it has in batch mode since Emacs 24. +++ ** New user option 'remote-file-name-inhibit-delete-by-moving-to-trash'. When non-nil, this option suppresses moving remote files to the local trash when deleting. Default is nil. --- ** New user option 'remote-file-name-inhibit-auto-save'. If this user option is non-nil, 'auto-save-mode' will not auto-save remote buffers. The default is nil. +++ ** New user option 'yes-or-no-prompt'. This allows the user to customize the prompt that is appended by 'yes-or-no-p' when asking questions. The default value is "(yes or no) ". --- ** New face 'display-time-date-and-time'. This is used for displaying the time and date components of 'display-time-mode'. * Editing Changes in Emacs 30.1 --- ** On X, Emacs now supports input methods which perform "string conversion". This means an input method can now ask Emacs to delete text surrounding point and replace it with something else, as well as query Emacs for surrounding text. If your input method allows you to "undo" mistaken compositions, this will now work as well. --- ** New command 'kill-matching-buffers-no-ask'. This works like 'kill-matching-buffers', but without asking for confirmation. * Changes in Specialized Modes and Packages in Emacs 30.1 --- ** Variable order and truncation can now be configured in 'gdb-many-windows'. The new user option 'gdb-locals-table-row-config' allows users to configure the order and max length of various properties in the local variables buffer when using 'gdb-many-windows'. By default, this user option is set to write the properties in the order: name, type and value, where the name and type are truncated to 20 characters, and the value is truncated according to the value of 'gdb-locals-value-limit'. If you want to get back the old behavior, set the user option to the value (setopt gdb-locals-table-row-config `((type . 0) (name . 0) (value . ,gdb-locals-value-limit))) ** Compile *** New user option 'grep-use-headings'. When non-nil, the output of Grep is split into sections, one for each file, instead of having file names prefixed to each line. It is equivalent to the "--heading" option of some tools such as 'git grep' and 'rg'. The headings are displayed using the new 'grep-heading' face. ** VC --- *** New user option 'vc-git-shortlog-switches'. This is a string or a list of strings that specifies the Git log switches for shortlogs, such as the one produced by 'C-x v L'. 'vc-git-log-switches' is no longer used for shortlogs. ** Diff Mode +++ *** 'diff-ignore-whitespace-hunk' can now be applied to all hunks. When called with a non-nil prefix argument, 'diff-ignore-whitespace-hunk' now iterates over all the hunks in the current diff, regenerating them without whitespace changes. +++ *** New user option 'diff-ignore-whitespace-switches'. This allows changing which type of whitespace changes are ignored when regenerating hunks with 'diff-ignore-whitespace-hunk'. Defaults to the previously hard-coded "-b". ** Buffer Selection --- *** New user option 'bs-default-action-list'. You can now configure how to display the "*buffer-selection*" buffer using this new option. (Or set 'display-buffer-alist' directly.) ** Eshell +++ *** New splice operator for Eshell dollar expansions. Dollar expansions in Eshell now let you splice the elements of the expansion in-place using '$@expr'. This makes it easier to fill lists of arguments into a command, such as when defining aliases. For more information, see the "(eshell) Dollars Expansion" node in the Eshell manual. +++ *** Eshell now supports negative numbers and ranges for indices. Now, you can retrieve the last element of a list with '$my-list[-1]' or get a sublist of elements 2 through 4 with '$my-list[2..5]'. For more information, see the "(eshell) Dollars Expansion" node in the Eshell manual. --- *** Eshell now uses 'field' properties in its output. In particular, this means that pressing the '' key moves the point to the beginning of your input, not the beginning of the whole line. If you want to go back to the old behavior, add something like this to your configuration: (keymap-set eshell-mode-map "" #'eshell-bol-ignoring-prompt) --- *** You can now properly unload Eshell. Calling '(unload-feature 'eshell)' no longer signals an error, and now correctly unloads Eshell and all of its modules. +++ *** 'eshell-read-aliases-list' is now an interactive command. After manually editing 'eshell-aliases-file', you can use this command to load the edited aliases. +++ *** 'rgrep' is now a builtin command. Running 'rgrep' in Eshell now uses the Emacs grep facility instead of calling external rgrep. ** Shell Mode +++ *** New user option 'shell-get-old-input-include-continuation-lines'. When this user option is non-nil, 'shell-get-old-input' ('C-RET') includes multiple shell "\" continuation lines from command output. Default is nil. ** Prog Mode +++ *** New command 'prog-fill-reindent-defun'. This command either fills a single paragraph in a defun, such as a docstring, or a comment, or (re)indents the surrounding defun if point is not in a comment or a string. It is by default bound to 'M-q' in 'prog-mode' and all its descendants. ** Tramp +++ *** New connection method "toolbox". This allows accessing system containers provided by Toolbox. +++ *** Rename 'tramp-use-ssh-controlmaster-options' to 'tramp-use-connection-share. The old name still exists as defvaralias. This user option controls now connection sharing for both ssh-based and plink-based methods. It allows the values t, nil, and 'suppress'. The latter suppresses also "ControlMaster" settings in the user's "~/.ssh/config" file, or connection share configuration in PuTTY sessions, respectively. ** EWW +++ *** 'eww-open-file' can now display the file in a new buffer. By default, the command reuses the "*eww*" buffer, but if called with the new argument NEW-BUFFER non-nil, it will use a new buffer instead. Interactively, invoke 'eww-open-file' with a prefix argument to activate this behavior. ** go-ts-mode +++ *** New command 'go-ts-mode-docstring'. This command adds a docstring comment to the current defun. If a comment already exists, point is only moved to the comment. It is bound to 'C-c C-d' in 'go-ts-mode'. ** Man-mode +++ *** New user option 'Man-prefer-synchronous-call'. When this is non-nil, call the 'man' program synchronously rather than asynchronously (which is the default behavior). ** DocView --- *** New face 'doc-view-svg-face'. This replaces 'doc-view-svg-foreground' and 'doc-view-svg-background'. ** Shortdoc +++ *** New function 'shortdoc-function-examples'. This function returns examples of use of a given Emacs Lisp function from the available shortdoc information. +++ *** New function 'shortdoc-help-fns-examples-function'. This function inserts into the current buffer examples of use of a given Emacs Lisp function, which it gleans from the shortdoc information. If you want 'describe-function' ('C-h f') to insert examples of using the function into regular "*Help*" buffers, add the following to your init file: (add-hook 'help-fns-describe-function-functions #'shortdoc-help-fns-examples-function) ** Package --- *** New user option 'package-vc-register-as-project'. When non-nil, it will automatically register every package as a project, that you can quickly select using 'project-switch-project' ('C-x p p'). ** Flymake +++ *** New user option 'flymake-show-diagnostics-at-end-of-line'. When non-nil, Flymake shows summarized descriptions of diagnostics at the end of the line. Depending on your preference, this can either be distracting and easily confused with actual code, or a significant early aid that relieves you from moving the buffer or reaching for the mouse to consult an error message. * New Modes and Packages in Emacs 30.1 ** New major modes based on the tree-sitter library +++ *** New major mode 'html-ts-mode'. An optional major mode based on the tree-sitter library for editing HTML files. --- *** New major mode 'heex-ts-mode'. A major mode based on the tree-sitter library for editing HEEx files. --- *** New major mode 'elixir-ts-mode'. A major mode based on the tree-sitter library for editing Elixir files. --- ** The highly accessible Modus themes collection has six items. The 'modus-operandi' and 'modus-vivendi' are the main themes that have been part of Emacs since version 28. The former is light, the latter dark. In addition to these, we now have 'modus-operandi-tinted' and 'modus-vivendi-tinted' for easier legibility, as well as 'modus-operandi-deuteranopia' and 'modus-vivendi-deuteranopia' to cover the needs of users with red-green color deficiency. The Info manual "(modus-themes) Top" describes the details and showcases all their customization options. * Incompatible Lisp Changes in Emacs 30.1 --- ** The escape sequence '\x' not followed by hex digits is now an error. Previously, '\x' without at least one hex digit denoted character code zero (NUL) but as this was neither intended nor documented or even known by anyone, it is now treated as an error by the Lisp reader. --- ** Connection-local variables are applied in buffers visiting a remote file. This overrides possible directory-local or file-local variables with the same name. --- ** User option 'tramp-completion-reread-directory-timeout' has been removed. This user option has been obsoleted in Emacs 27, use 'remote-file-name-inhibit-cache' instead. --- ** User options 'eshell-NAME-unload-hook' are now obsolete. These hooks were named incorrectly, and so they never actually ran when unloading the correspending feature. Instead, you should use hooks named after the feature name, like 'esh-mode-unload-hook'. * Lisp Changes in Emacs 30.1 ** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill. ** Functions and variables to transpose sexps +++ *** New helper variable 'transpose-sexps-function'. Emacs now can set this variable to customize the behavior of the 'transpose-sexps' function. +++ *** New function 'transpose-sexps-default-function'. The previous implementation is moved into its own function, to be bound by 'transpose-sexps-function'. *** New function 'treesit-transpose-sexps'. Tree-sitter now unconditionally sets 'transpose-sexps-function' for all tree-sitter enabled modes. This functionality utilizes the new 'transpose-sexps-function'. ** Functions and variables to move by program statements *** New variable 'forward-sentence-function'. Major modes can now set this variable to customize the behavior of the 'forward-sentence' command. *** New function 'forward-sentence-default-function'. The previous implementation of 'forward-sentence' is moved into its own function, to be bound by 'forward-sentence-function'. *** New buffer-local variable 'treesit-sentence-type-regexp'. Similarly to 'treesit-defun-type-regexp', this variable is used to define "sentences" in tree-sitter enabled modes. *** New function 'treesit-forward-sentence'. All tree-sitter enabled modes that define 'treesit-sentence-type-regexp' now set 'forward-sentence-function' to call 'treesit-forward-sentence'. ** Functions and variables to move by program sexps *** New buffer-local variable 'treesit-sexp-type-regexp'. Similarly to 'treesit-defun-type-regexp', this variable is used to define "sexps" in tree-sitter enabled modes. *** New function 'treesit-forward-sexp'. Tree-sitter conditionally sets 'forward-sexp-function' for major modes that have defined 'treesit-sexp-type-regexp' to enable sexp-related motion commands. ** New or changed byte-compilation warnings --- *** Warn about empty bodies for more special forms and macros. The compiler now warns about an empty body argument to 'when', 'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to the existing warnings for 'let' and 'let*'. Example: (when (> x 2)) This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'empty-body'. --- *** Warn about quoted error names in 'condition-case' and 'ignore-error'. The compiler now warns about quoted condition (error) names in 'condition-case' and 'ignore-error'. Example: (condition-case nil (/ x y) ('arith-error "division by zero")) Quoting them adds the error name 'quote' to those handled or ignored respectively, which was probably not intended. --- *** Warn about comparison with literal constants without defined identity. The compiler now warns about comparisons by identity with a literal string, cons, vector, record, function, large integer or float as this may not match any value at all. Example: (eq x "hello") Only literals for symbols and small integers (fixnums), including characters, are guaranteed to have a consistent (unique) identity. This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq', 'remq' and 'delq'. To compare by (structural) value, use 'equal', 'member', 'assoc', 'rassoc', 'remove' or 'delete' instead. Floats and bignums can also be compared using 'eql', '=' and 'memql'. Function literals cannot be compared reliably at all. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'suspicious'. --- *** Warn about 'condition-case' without handlers. The compiler now warns when the 'condition-case' form is used without any actual handlers, as in (condition-case nil (read buffer)) because it has no effect other than the execution of the body form. In particular, no errors are caught or suppressed. If the intention was to catch all errors, add an explicit handler for 'error', or use 'ignore-error' or 'ignore-errors'. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'suspicious'. --- *** Warn about 'unwind-protect' without unwind forms. The compiler now warns when the 'unwind-protect' form is used without any unwind forms, as in (unwind-protect (read buffer)) because the behavior is identical to that of the argument; there is no protection of any kind. Perhaps the intended unwind forms have been misplaced or forgotten, or the use of 'unwind-protect' could be simplified away. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'suspicious'. --- *** Warn about more ignored function return values. The compiler now warns when the return value from certain functions is ignored. Example: (progn (nreverse my-list) my-list) will elicit a warning because it is usually pointless to call 'nreverse' on a list without using the returned value. To silence the warning, make use of the value in some way, such as assigning it to a variable. You can also wrap the function call in '(ignore ...)'. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'ignored-return-value'. +++ ** New function 'file-user-uid'. This function is like 'user-uid', but is aware of file name handlers, so it will return the remote UID for remote files (or -1 if the connection has no associated user). +++ ** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases. Previously, 'fset', 'defalias' and 'defvaralias' could be made to build circular function and variable indirection chains as in (defalias 'able 'baker) (defalias 'baker 'able) but trying to use them would sometimes make Emacs hang. Now, an attempt to create such a loop results in an error. Since circular alias chains now cannot occur, 'function-alias-p', 'indirect-function' and 'indirect-variable' will never signal an error. Their 'noerror' arguments have no effect and are therefore obsolete. * Changes in Emacs 30.1 on Non-Free Operating Systems ---------------------------------------------------------------------- This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . Local variables: coding: utf-8 mode: outline mode: emacs-news paragraph-separate: "[ ]" end: