mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
Canvas images support efficient updating and refreshing. An image specifier with ':type canvas' creates a canvas image. The canvas has an associated writable pixel buffer. After changing the ':data' vector or writing to the pixel buffer a call to 'canvas-refresh' redraws the canvas image. See bug#80281. Co-Authored-By: Divya Ranjan <divya@subvertising.org> Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de> Canvas changes: * doc/lispref/display.texi (Images): Add Canvas Images to menu. (Canvas Images): New node documenting canvas image objects, the `:data-width', `:data-height', `:data' and `:file' properties, and `canvas-refresh'. * doc/lispref/elisp.texi (Top): Reference new Canvas Images node. * doc/lispref/internals.texi (Writing Dynamic Modules): Add Module Canvas API to menu. (Module Canvas API): New node documenting `canvas_data' module function. * etc/NEWS: Announce the addition. * lisp/image.el (create-image): Add `:id' to image specification of canvas images. * src/dispextern.h (struct image): Add `refresh', `original_width' and `original_height' fields. (redraw_image_glyphs, canvas_data): New prototypes. * src/emacs-module.c (module_canvas_data): New function. (initialize_environment): Register `canvas_data' module function. * src/image.c (struct canvas): New struct for canvas. (canvas_prepare_for_display, canvas_free_unused): New forward declarations. (prepare_image_for_display): Call `canvas_prepare_for_display' when the canvas refresh counter has changed. Set image `original_width' and `original_height'. (filter_image_spec): Exclude `:data' from the image cache key for canvas images, so mutating the data vector in place does not create a new cache entry. (Fclear_image_cache): Call `canvas_free_unused'. (image_set_transform): Use CAIRO_FILTER_GOOD instead of CAIRO_FILTER_BEST for canvas images, for performance. Do not set image `original_width' and `original_height'. (canvas_image_p, canvas_free_unused, canvas_apply_data, canvas_get) (canvas_parse, canvas_load, canvas_prepare_for_display, canvas_data): New functions implementing canvas creation, resizing, and reloading of `:data' or `:file' content. (Fcanvas_refresh): New defun `canvas-refresh', with an optional RELOAD-DATA argument to reread `:data' or `:file'. (initialize_image_type, syms_of_image): Register the `canvas' image type and `canvas-refresh'. * src/module-env-32.h (canvas_data): New prototype. * src/nsimage.m (ns_image_reset): New function to recreate an NS pixmap to update the canvas. * src/nsterm.h: Add prototype for `ns_image_reset'. * src/xdisp.c (redraw_image_glyphs_window) (redraw_image_glyphs_window_tree, redraw_image_glyphs): New functions to redraw only the glyphs referencing a given canvas image spec, falling back to a full frame redraw if the frame is garbaged. * test/src/emacs-module-resources/mod-test.c (mod-test-canvas-read) (mod-test-canvas-write, mod-test-canvas-invalid): New helper functions. * test/src/emacs-module-tests.el (test-canvas-gen-file) (mod-test-canvas/valid, mod-test-canvas/invalid, mod-test-canvas/vector) (mod-test-canvas/vector-reload, mod-test-canvas/unibyte) (mod-test-canvas/file, mod-test-canvas/gc-stress): New tests.
424 lines
15 KiB
Plaintext
424 lines
15 KiB
Plaintext
GNU Emacs NEWS -- history of user-visible changes.
|
||
|
||
Copyright (C) 2022-2026 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 32.
|
||
|
||
See file HISTORY for a list of GNU Emacs versions and release dates.
|
||
See files NEWS.31, NEWS.30, ..., 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 32.1
|
||
|
||
|
||
* Startup Changes in Emacs 32.1
|
||
|
||
** New terminal type Kmscon.
|
||
Emacs now supports the Kmscon terminal emulator available on GNU/Linux
|
||
systems.
|
||
|
||
* Changes in Emacs 32.1
|
||
|
||
+++
|
||
|
||
---
|
||
** Emacs no longer kills child processes after EPIPE.
|
||
Previously, Emacs would immediately kill a child process and set its
|
||
exit status to 256 if sending input to that process returned EPIPE.
|
||
Now when this happens, Emacs closes the file descriptor to write to the
|
||
child process, but allows it to continue execution as normal.
|
||
|
||
---
|
||
** New variable 'tty-cursor-movement-use-TAB'.
|
||
If this is set to the nil value, Emacs will not use TABs to optimize
|
||
cursor motion on text-mode terminals. This is for the rare cases where
|
||
the hardware tabs of the terminal were set to a non-default value by the
|
||
'tabs' command or similar, or if using TABs for cursor movement has any
|
||
other undesired effects. The default is t, which preserves past
|
||
behavior.
|
||
|
||
If this variable is nil, 'tty-cursor-movement-use-TAB-BS' has no effect,
|
||
and Emacs will never use TABs for any cursor-movement sequences.
|
||
|
||
---
|
||
** File- and directory-local variables respect user option setters.
|
||
Values of variables that are user options mentioned in file-local
|
||
variable sections and directory-locals via ".dir-locals.el" are now
|
||
set similarly to 'setopt-local'; i.e., if a user option has a defcustom
|
||
':set' function, that function will be invoked.
|
||
|
||
---
|
||
** New user option 'setopt-local-type-mismatch'.
|
||
This option controls what 'setopt-local' does when it detects a type
|
||
mismatch between the specified value and the ':type' specification of a
|
||
user option. Its backward-compatible default is nil which emits a
|
||
warning and accepts the type-mismatched value. You can control this by
|
||
customizing 'setopt-local-type-mismatch' to a non-nil value: the value
|
||
'accept' inhibits the warning and silently accepts type-mismatched
|
||
values; the value 'discard' inhibits the warning and discards
|
||
type-mismatched values; any other non-nil value prompts you whether to
|
||
accept or ignore the value.
|
||
|
||
---
|
||
** Specifying a minor mode as a local variable enables that mode.
|
||
The previous behavior, toggling the mode, was neither reliable nor
|
||
generally desirable.
|
||
|
||
+++
|
||
** Emacs tries to display the overlay arrow in the left margin.
|
||
On a non-graphical display (or when the left fringe is not shown), if a
|
||
left margin is present, Emacs will now display the overlay arrow into
|
||
this margin. Edebug is now using this feature by explicitly setting up
|
||
a left margin for it.
|
||
|
||
** Mode Line
|
||
|
||
*** Popup menus invoked from mode line select another window.
|
||
Clicking mode line elements in inactive windows now first
|
||
selects another window before displaying the menu, so the
|
||
commands invoked from the menu will operate on the right buffer.
|
||
You can restore the previous behavior by removing
|
||
'mode-line-window-select' from 'x-pre-popup-menu-hook'.
|
||
|
||
** Minibuffer
|
||
|
||
---
|
||
*** The variable 'completion-ignore-case' is now customizable.
|
||
|
||
---
|
||
*** 'icomplete-in-buffer' users need no longer advise 'completion-at-point'.
|
||
The "*Completions*" buffer no longer pops up in addition to Icomplete's
|
||
in-buffer display of completions, by default.
|
||
Therefore, the instructions in the NEWS file for Emacs 30.1 to add
|
||
|
||
(advice-add 'completion-at-point :after #'minibuffer-hide-completions)
|
||
|
||
to your initialization file no longer apply, and you may remove it.
|
||
|
||
|
||
* Editing Changes in Emacs 32.1
|
||
|
||
+++
|
||
** New user option 'query-replace-show-preview'.
|
||
When set to t, the replacement commands preview the replacement while
|
||
you type it: the matches visible in the window are shown as they would
|
||
look after the replacement, using the new face 'query-replace-preview'.
|
||
This tells you what back-references like '\1' expand to before you
|
||
commit to the edit. The preview is off by default.
|
||
|
||
|
||
* Changes in Specialized Modes and Packages in Emacs 32.1
|
||
|
||
** Package
|
||
|
||
---
|
||
*** Package-vc can copy local changes from existing installations.
|
||
When installing the latest release of a package, 'package-vc' will
|
||
propose copying files from an existing tarball installation of the same
|
||
package with the same version. This is useful if you have started
|
||
making local changes to your tarball installation, and then decided to
|
||
check out the repository to prepare a patch for the package maintainer.
|
||
|
||
** Compilation mode
|
||
|
||
---
|
||
*** Messages from Ansible are now recognized.
|
||
|
||
** Flymake
|
||
|
||
+++
|
||
*** Overhauled inline diagnostics.
|
||
A new variable 'flymake-inline-diagnostics' replaces
|
||
'flymake-show-diagnostics-at-end-of-line' and controls how Flymake
|
||
annotates diagnostic text directly in the buffer. Besides the previous
|
||
styles ('eol', 'short', and 'fancy'), it can be used to only display
|
||
certain styles in certain situations, such as using a 'fancy' inline
|
||
displays on nearby diagnostic only. The old variable is now an obsolete
|
||
alias. In parallel, the variable 'flymake-diagnostic-format-alist'
|
||
contains new options to configure exactly which parts of a diagnostic to
|
||
show for each inline layout possibility.
|
||
|
||
** Man
|
||
|
||
---
|
||
*** OSC 8 hyperlinks in man pages are now buttonized.
|
||
When a man page contains OSC 8 hyperlink escape sequences, they
|
||
are now buttonized, allowing using mouse or 'RET' to follow them.
|
||
|
||
** Woman
|
||
|
||
---
|
||
*** The variable 'woman-topic-history' is now obsolete.
|
||
Use 'Man-topic-history' instead.
|
||
|
||
** VC
|
||
|
||
+++
|
||
|
||
*** VC Directory outgoing revisions count is now asynchronous.
|
||
This means it won't get in your way even if it's slow for your
|
||
repository. As such, the 'vc-dir-show-outgoing-count' option is now
|
||
obsolete.
|
||
|
||
---
|
||
*** VC Directory now shows key binding hints.
|
||
To hide these, you can customize the new user option
|
||
'vc-dir-show-key-binding-hints' to nil.
|
||
Backends can supply additional hints using the new 'dir-extra-hints'
|
||
backend method.
|
||
|
||
---
|
||
*** VC Directory doesn't process very large status output by default.
|
||
If the VCS status process used to populate the VC Directory buffer
|
||
produces a very large amount of output, it often means that you did
|
||
something accidental like renaming a subdirectory containing thousands
|
||
of files, and Emacs can become unresponsive while trying to process all
|
||
the output. Now Emacs stops early. When this happens, VC Directory
|
||
includes a message saying so, with a button to override it. You can
|
||
customize the new user option 'vc-dir-process-output-limit' to control
|
||
how early to stop, and to disable this feature.
|
||
|
||
---
|
||
*** VC-Dir resolves symbolic links only if the directory has no backend.
|
||
When called interactively, 'M-x vc-dir' checks if the passed directory
|
||
has a VC backend. If it doesn't, but the directory's truename does
|
||
have a backend, and 'vc-follow-symlinks' is non-nil, the truename is
|
||
used instead. Previously, the truename was used unconditionally.
|
||
|
||
+++
|
||
*** Improved creation of commit log entry from ChangeLog.
|
||
When VC detects that all log entries for the current changeset come from
|
||
the same ChangeLog file or buffer, it now inserts the entire body of the
|
||
ChangeLog entry into the "*vc-log*" buffer. If the ChangeLog entry
|
||
contains a summary line, VC inserts it into the "*vc-log*" Summary header.
|
||
If VC detects that the set of changed files listed in the ChangeLog
|
||
entry differs from the current VC fileset, it displays a warning.
|
||
|
||
** Outline mode
|
||
|
||
*** New command 'outline-show-entry-and-parents'.
|
||
It is bound to 'C-e' and reveals the current entry
|
||
with its parent hierarchy.
|
||
|
||
---
|
||
*** New function 'outline-search-from-regexp'.
|
||
A generic 'outline-search-function' implementation driven by
|
||
'outline-regexp', suitable for modes or minor modes that customize
|
||
'outline-regexp' but do not need a custom search strategy.
|
||
Install it with:
|
||
|
||
(setq-local outline-search-function #'outline-search-from-regexp)
|
||
|
||
---
|
||
*** 'outline-search-function' is now a user option.
|
||
Previously a plain variable, it is now a 'defcustom'
|
||
with named choices for the predefined search functions
|
||
('outline-search-from-regexp' and 'outline-search-level')
|
||
as well as the default nil and arbitrary user functions.
|
||
|
||
---
|
||
*** New command 'outline-xref'.
|
||
It allows users to navigate the current buffer's outline using Xref.
|
||
It is bound to 'M-o'.
|
||
|
||
** CPerl mode
|
||
|
||
*** Perl 5.44 support: Signatures with named parameters
|
||
|
||
Perl 5.44 allows to declare a signature like "sub subname (:$par)", see
|
||
https://perldoc.perl.org/5.44.0/perldelta#Named-Parameters-in-Signatures
|
||
CPerl mode now recognizes this as a variable declaration
|
||
|
||
** Newsticker
|
||
|
||
---
|
||
*** New command to copy the URL of the selected newsticker item.
|
||
The new command 'newsticker-treeview-copy-url', bound to 'w', adds the
|
||
URL of the currently selected item in the list view to the kill ring.
|
||
|
||
** Rmail
|
||
|
||
+++
|
||
*** Files named "RMAIL" or ending in ".rmail" are now visited in Rmail mode.
|
||
You can now visit such files in Rmail mode using ordinary file-visiting
|
||
commands, such as 'C-x C-f'.
|
||
|
||
** Timeclock
|
||
|
||
---
|
||
*** New user option 'timeclock-use-24hr-format'.
|
||
If this option is set to non-nil, displayed times (clocked in/out
|
||
since, time to leave) will use 24-hour clock instead of 12-hour clock.
|
||
|
||
|
||
* New Modes and Packages in Emacs 32.1
|
||
|
||
** New major modes based on the tree-sitter library
|
||
|
||
*** New major mode 'markdown-ts-mode'.
|
||
A major mode based on the tree-sitter library for editing Markdown
|
||
files. Markdown files are visited using this mode when the required
|
||
tree-sitter grammars ('markdown' and 'markdown-inline') are available,
|
||
or when the user has opted in via 'treesit-enabled-modes'. Otherwise,
|
||
Markdown files fall back to 'text-mode'.
|
||
|
||
To install the grammars, use 'M-x markdown-ts-mode-install-parsers'.
|
||
|
||
** Speedbar
|
||
|
||
---
|
||
*** A nil value for 'speedbar-directory-unshown-regexp' means "show all".
|
||
|
||
---
|
||
*** A nil value for 'speedbar-file-unshown-regexp' means "show all".
|
||
|
||
|
||
* Incompatible Lisp Changes in Emacs 32.1
|
||
|
||
+++
|
||
** 'intern' and 'intern-soft' ignore 'read-symbol-shorthands'.
|
||
This means they revert to the behavior of Emacs<28.
|
||
In those cases where shorthands need to be obeyed, you now need to use
|
||
'shorthands-intern', 'shorthands-intern-soft', or 'shorthands-to-longhand'.
|
||
And 'shorthands-of-symbol' provides the reverse mapping.
|
||
|
||
** Pcase
|
||
|
||
+++
|
||
*** Add 'pcase-let*-strict'.
|
||
This macro is like 'pcase-let*', but signals an error if a 'pcase'
|
||
pattern does not match its corresponding value. This can be useful for
|
||
destructuring values when you do not wish to continue if the
|
||
corresponding value is not as expected.
|
||
|
||
+++
|
||
** The transition variable 'current-time-list' now defaults to nil.
|
||
Therefore, timestamps now default to '(TICKS . HZ)' form instead of the
|
||
older '(HIGH LOW USEC PSEC)' form.
|
||
|
||
|
||
* Lisp Changes in Emacs 32.1
|
||
|
||
+++
|
||
** Support for canvas image objects.
|
||
Canvas images support efficient updating and refreshing. An image
|
||
specifier with ':type canvas' creates a canvas image. The canvas has an
|
||
associated writable pixel buffer. The dynamic module function 'canvas_data'
|
||
provides access to the pixel buffer. After changing the ':data' vector or
|
||
writing to the pixel buffer a call to 'canvas-refresh' redraws the canvas
|
||
image.
|
||
|
||
+++
|
||
** 'ignore' is now also a place, acting as a "blackhole" like "/dev/null".
|
||
E.g., '(push (new-elem) (pcase (foo) (0 var1) (1 var2) (_ (ignore))))'.
|
||
|
||
+++
|
||
** 'kill-all-local-variables' can kill locals silently and reset the buffer.
|
||
This function's KILL-PERMANENT argument now accepts the value
|
||
'permanent-local', which kills all locals ignoring any variable
|
||
watchers. That argument can also be 'reset', which does what
|
||
'permanent-local' does, and also resets the buffer as if it were newly
|
||
created. Use these with caution to avoid unexpected behavior such as
|
||
'default-directory' being reset to nil.
|
||
|
||
---
|
||
** 'with-work-buffer' kills all locals silently and resets its buffers.
|
||
When this macro returns a buffer to its buffer pool, it now kills all
|
||
buffer locals silently, ignoring any variable watchers, and resets the
|
||
buffer as if it were newly created.
|
||
|
||
+++
|
||
** The new function 'markers-in' returns the set of markers in a region.
|
||
|
||
+++
|
||
** New buffer-local variable 'comment-start-line-regexp'.
|
||
Modes that support both line and block comments should set this
|
||
variable to a regexp that matches only the start of line comments, so
|
||
Emacs can distinguish between line and block comments.
|
||
|
||
---
|
||
** New variable 'completion-frontend-properties'.
|
||
This variable generalizes the 'completion-lazy-hilit' variable added in
|
||
Emacs 30. It allows Lisp programs that present completion candidates
|
||
("completion frontends") to provide additional information which can be
|
||
used to adjust or optimize completion candidates computation.
|
||
|
||
** D-Bus
|
||
|
||
+++
|
||
*** Support error handler in asynchronous method calls.
|
||
The HANDLER argument of 'dbus-call-method-asynchronously' can be a cons
|
||
cell '(HANDLER . ERROR-HANDLER)'. ERROR-HANDLER is invoked if the
|
||
method call returns with a D-Bus error; the error is passed as argument.
|
||
|
||
** Elisp Scope
|
||
|
||
*** Custom analyzers can be associated with multiple functions.
|
||
Elisp Scope macros that define custom analyzer functions, such as
|
||
'elisp-scope-define-function-analyzer' and
|
||
'elisp-scope-define-macro-analyzer', can now take a list of symbols to
|
||
which the defined analyzer should apply (or a single symbol, as before).
|
||
This makes it easy to specify the same analyzer for multiple functions.
|
||
|
||
*** New macro 'elisp-scope-define-function-spec'.
|
||
This macro in a declarative alternative to
|
||
'elisp-scope-define-function-analyzer'. It lets you tell Elisp Scope
|
||
how to analyze the arguments of a function by declaring the
|
||
specification of each argument, rather than implementing an analyzer
|
||
function as you would with 'elisp-scope-define-function-analyzer'.
|
||
|
||
+++
|
||
** New variable 'display-buffer-default-alist'.
|
||
Lisp programs may let-bind this variable to specify conditional actions
|
||
for nested 'display-buffer' calls.
|
||
|
||
|
||
* Changes in Emacs 32.1 on Non-Free Operating Systems
|
||
|
||
+++
|
||
*** Emacs has been updated to target Android 17.
|
||
Emacs has been updated to require the SDK for Android 17 (API level 37)
|
||
during compilation, and to target that version of the operating system.
|
||
A corollary of this change is that on Android 17 and later systems, it
|
||
must be granted permission to access nearby devices from Settings in
|
||
order to establish network connections to hosts on local networks.
|
||
|
||
|
||
----------------------------------------------------------------------
|
||
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 <https://www.gnu.org/licenses/>.
|
||
|
||
|
||
Local variables:
|
||
coding: utf-8
|
||
mode: outline
|
||
mode: emacs-news
|
||
paragraph-separate: "[ ]"
|
||
end:
|