mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-26 15:10:50 -08:00
A common complaint about the module API is that modules can't communicate asynchronously with Emacs. While it isn't possible to call arbitrary Emacs functions asynchronously, writing to a pipe should always be fine and is a pretty low-hanging fruit. This patch implements a function that adapts an existing pipe process. That way, users can use familiar tools like process filters or 'accept-process-output'. * src/module-env-28.h: Add 'open_channel' module function. * src/emacs-module.c (module_open_channel): Provide definition for 'open_channel'. (initialize_environment): Use it. * src/process.c (open_channel_for_module): New helper function. (syms_of_process): Define necessary symbol. * test/src/emacs-module-tests.el (module/async-pipe): New unit test. * test/data/emacs-module/mod-test.c (signal_system_error): New helper function. (signal_errno): Use it. (write_to_pipe): New function running in the background. (Fmod_test_async_pipe): New test module function. (emacs_module_init): Export it. * doc/lispref/internals.texi (Module Misc): Document new module function. * doc/lispref/processes.texi (Asynchronous Processes): New anchor for pipe processes. * etc/NEWS: Document 'open_channel' function.
301 lines
10 KiB
Text
301 lines
10 KiB
Text
GNU Emacs NEWS -- history of user-visible changes.
|
||
|
||
Copyright (C) 2017-2020 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 28.
|
||
|
||
See file HISTORY for a list of GNU Emacs versions and release dates.
|
||
See files NEWS.27, NEWS.26, ..., 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 28.1
|
||
|
||
** Cairo graphics library is now used by default if found.
|
||
'--with-cairo' is now the default, if the appropriate development files
|
||
are found by 'configure'. Note that building with Cairo means using
|
||
Pango instead of libXFT for font support. Since Pango 1.44 has
|
||
removed support for bitmapped fonts, this may require you to adjust
|
||
your font settings.
|
||
|
||
Note also that 'FontBackend' settings in ".Xdefaults" or
|
||
".Xresources", or 'font-backend' frame parameter settings in your init
|
||
files, may need to be adjusted, as 'xft' is no longer a valid backend
|
||
when using Cairo. Use 'ftcrhb' if your Emacs was built with HarfBuzz
|
||
text shaping support, and 'ftcr' otherwise. You can determine this by
|
||
checking 'system-configuration-features'. The 'ftcr' backend will
|
||
still be available when HarfBuzz is supported, but will not be used by
|
||
default. We strongly recommend building with HarBuzz support. 'x' is
|
||
still a valid backend.
|
||
|
||
---
|
||
** 'configure' now warns about building with libXft support.
|
||
libXft is unmaintained, and causes a number of problems with modern
|
||
fonts including but not limited to crashes; support for it may be
|
||
removed in a future version of Emacs. Please consider using
|
||
Cairo + HarfBuzz instead.
|
||
|
||
---
|
||
** 'configure' now warns about not using HarfBuzz if using Cairo.
|
||
We want to encourage people to use the most modern font features
|
||
available, and this is the Cairo graphics library + HarfBuzz for font
|
||
shaping, so 'configure' now recommends that combination.
|
||
|
||
---
|
||
** The ftx font backend driver has been removed.
|
||
It was declared obsolete in Emacs 27.1.
|
||
|
||
|
||
* Startup Changes in Emacs 28.1
|
||
|
||
|
||
* Changes in Emacs 28.1
|
||
|
||
** Support for '(box . SIZE)' cursor-type.
|
||
By default, 'box' cursor always has a filled box shape. But if you
|
||
specify cursor-type to be '(box . SIZE)', the cursor becomes a hollow
|
||
box if the point is on an image larger than 'SIZE' pixels in any
|
||
dimension.
|
||
|
||
|
||
* Editing Changes in Emacs 28.1
|
||
|
||
+++
|
||
** New command 'undo-redo'.
|
||
It undoes previous undo commands, but doesn't record itself as an
|
||
undoable command.
|
||
|
||
+++
|
||
** 'read-number' now has its own history variable.
|
||
Additionally, the function now accepts a HIST argument which can be
|
||
used to specify a custom history variable.
|
||
|
||
+++
|
||
** Input history for 'goto-line' is now local to every buffer.
|
||
Each buffer will keep a separate history of line numbers used with
|
||
'goto-line'. This should help making faster the process of finding
|
||
line numbers that were previously jumped to.
|
||
|
||
+++
|
||
** When 'suggest-key-bindings' is non-nil, the completion list of 'M-x'
|
||
shows equivalent key bindings for all commands that have them.
|
||
|
||
|
||
* Changes in Specialized Modes and Packages in Emacs 28.1
|
||
|
||
** Emacs-Lisp mode
|
||
*** The mode-line now indicates whether we're using lexical or dynamic scoping.
|
||
|
||
** Dired
|
||
|
||
*** New option 'dired-mark-region' affects all Dired commands that mark files.
|
||
When non-nil and the region is active in Transient Mark mode,
|
||
then Dired commands operate only on files in the active region.
|
||
The values 'file' and 'line' of this option define the details of
|
||
marking the file at the end of the region.
|
||
|
||
*** State changing VC operations are supported in dired-mode on files
|
||
(but still not on directories).
|
||
|
||
** Gnus
|
||
|
||
---
|
||
*** Change to default value of 'message-draft-headers' option.
|
||
The Date header has been removed from the default value, meaning that
|
||
draft or delayed messages will get a Date reflecting when the message
|
||
was sent. To restore the original behavior of dating a message
|
||
from when it is first saved or delayed, add the symbol 'Date back to
|
||
this option.
|
||
|
||
** Help
|
||
|
||
+++
|
||
*** New command 'describe-keymap' describes keybindings in a keymap.
|
||
|
||
---
|
||
** The old non-SMIE indentation of 'sh-mode' has been removed.
|
||
|
||
---
|
||
** The sb-image.el library is now marked obsolete.
|
||
This file was a compatibility kludge which is no longer needed.
|
||
|
||
---
|
||
** 'lisp-mode' now uses 'common-lisp-indent-function'.
|
||
To revert to the previous behaviour,
|
||
'(setq lisp-indent-function 'lisp-indent-function)' from 'lisp-mode-hook'.
|
||
|
||
** Edebug
|
||
|
||
+++
|
||
*** Edebug specification lists can use the new keyword '&error', which
|
||
unconditionally aborts the current edebug instrumentation with the
|
||
supplied error message.
|
||
|
||
+++
|
||
** ElDoc
|
||
|
||
*** New hook 'eldoc-documentation-functions' to be used for registering
|
||
doc string functions. This makes the results of all doc string
|
||
functions accessible to the user through the existing single function hook
|
||
'eldoc-documentation-function'.
|
||
|
||
*** 'eldoc-documentation-function' is now a custom variable.
|
||
Modes should use the new hook instead of this variable to register
|
||
their backends.
|
||
|
||
** Tramp
|
||
|
||
+++
|
||
*** New connection method "media", which allows accessing media devices
|
||
like cell phones, tablets or cameras.
|
||
|
||
** Tempo
|
||
|
||
---
|
||
*** 'tempo-define-template' can now re-assign templates to tags.
|
||
Previously, assigning a new template to an already defined tag had no
|
||
effect.
|
||
|
||
|
||
** map.el
|
||
|
||
*** Pcase 'map' pattern added keyword symbols abbreviation.
|
||
A pattern like '(map :sym)' binds the map's value for ':sym' to 'sym',
|
||
equivalent to '(map (:sym sym))'.
|
||
** Package
|
||
|
||
+++
|
||
*** New functions to filter the package list.
|
||
The filter command key bindings are as follows:
|
||
|
||
key binding
|
||
--- -------
|
||
/ a package-menu-filter-by-archive
|
||
/ k package-menu-filter-by-keyword
|
||
/ n package-menu-filter-by-name
|
||
/ s package-menu-filter-by-status
|
||
/ v package-menu-filter-by-version
|
||
/ / package-menu-filter-clear
|
||
|
||
** Gravatar
|
||
|
||
---
|
||
*** New user option 'gravatar-service' for host to query for gravatars.
|
||
Defaults to Libravatar, with Unicornify and Gravatar as options.
|
||
|
||
** Compilation mode
|
||
|
||
*** Regexp matching of messages is now case-sensitive by default.
|
||
The user option 'compilation-error-case-fold-search' can be set
|
||
for case-insensitive matching of messages.
|
||
|
||
|
||
* New Modes and Packages in Emacs 28.1
|
||
|
||
|
||
* Incompatible Editing Changes in Emacs 28.1
|
||
|
||
** In nroff mode, 'center-line' is now bound to 'M-o M-s'.
|
||
The original key binding was 'M-s', which interfered with I-search,
|
||
since the latter uses 'M-s' as a prefix key of the search prefix map.
|
||
|
||
** vc-print-branch-log shows the change log for BRANCH from its root
|
||
directory instead of the default directory.
|
||
|
||
|
||
* Incompatible Lisp Changes in Emacs 28.1
|
||
|
||
** 'equal' no longer examines some contents of window configurations.
|
||
Instead, it considers window configurations to be equal only if they
|
||
are 'eq'. To compare contents, use 'compare-window-configurations'
|
||
instead. This change helps fix a bug in 'sxhash-equal', which returned
|
||
incorrect hashes for window configurations and some other objects.
|
||
|
||
---
|
||
** The obsolete function 'thread-alive-p' has been removed.
|
||
|
||
** 'dns-query' now consistently uses Lisp integers to represent integers.
|
||
Formerly it made an exception for integer components of SOA records,
|
||
because SOA serial numbers can exceed fixnum ranges on 32-bit platforms.
|
||
Emacs now supports bignums so this old glitch is no longer needed.
|
||
|
||
** The Lisp variables 'previous-system-messages-locale' and
|
||
'previous-system-time-locale' have been removed, as they were created
|
||
by mistake and were not useful to Lisp code.
|
||
|
||
** The 'load-dangerous-libraries' variable is now obsolete.
|
||
It was used to allow loading Lisp libraries compiled by XEmacs, a
|
||
modified version of Emacs which is no longer actively maintained.
|
||
This is no longer supported, and setting this variable has no effect.
|
||
|
||
|
||
* Lisp Changes in Emacs 28.1
|
||
|
||
** New macro 'dlet' to dynamically bind variables
|
||
|
||
** The variable 'force-new-style-backquotes' has been removed.
|
||
This removes the final remaining trace of old-style backquotes.
|
||
|
||
** The module header 'emacs-module.h' now contains type aliases
|
||
'emacs_function' and 'emacs_finalizer' for module functions and
|
||
finalizers, respectively.
|
||
|
||
** Module functions can now install an optional finalizer that is
|
||
called when the function object is garbage-collected. Use
|
||
'set_function_finalizer' to set the finalizer and
|
||
'get_function_finalizer' to retrieve it.
|
||
|
||
** Modules can now open a channel to an existing pipe process using
|
||
the new module function 'open_channel'. Modules can use this
|
||
functionality to asynchronously send data back to Emacs.
|
||
|
||
** 'file-modes', 'set-file-modes', and 'set-file-times' now have an
|
||
optional argument specifying whether to follow symbolic links.
|
||
|
||
** 'parse-time-string' can now parse ISO 8601 format strings,
|
||
such as "2020-01-15T16:12:21-08:00".
|
||
|
||
|
||
* Changes in Emacs 28.1 on Non-Free Operating Systems
|
||
|
||
+++
|
||
** On macOS, Emacs can now load dynamic modules with a ".dylib" suffix.
|
||
'module-file-suffix' now has the value ".dylib" on macOS, but the
|
||
".so" suffix is supported as well.
|
||
|
||
|
||
----------------------------------------------------------------------
|
||
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
|
||
paragraph-separate: "[ ]*$"
|
||
end:
|