1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
emacs/doc/lispref
Philipp Stephani d28b004768 Add a module function to open a file descriptor connected to a pipe.
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.
2020-03-26 21:47:25 +01:00
..
abbrevs.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
anti.texi ; * doc/lispref/anti.texi (Antinews): Fix typo. 2020-01-11 14:14:11 +01:00
back.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
backups.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
book-spine.texi Fix single-quoting style in PDF manuals 2015-05-01 12:06:38 -07:00
buffers.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ChangeLog.1 Update copyright year to 2020 2020-01-01 00:59:52 +00:00
commands.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
compile.texi Document that 'byte-compile-dynamic' is obsolete 2020-03-07 14:23:23 +02:00
control.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
customize.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
debugging.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
display.texi Fix display of minibuffer prompt in ido.el 2020-02-12 21:39:44 +02:00
doclicense.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
edebug.texi Introduce element &error into edebug specification lists for macros 2020-01-17 21:53:13 +00:00
elisp.texi Update Antinews in ELisp manual 2020-01-11 13:36:07 +02:00
errors.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eval.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
files.texi Add ‘nofollow’ flag to set-file-times 2020-03-07 12:15:43 -08:00
frames.texi Merge from origin/emacs-27 2020-03-04 13:57:58 -08:00
functions.texi ; Move the description of define-inline to a different node in functions.texi 2020-01-11 11:48:17 +02:00
gpl.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
hash.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
help.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
hooks.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
index.texi Fix minor whitespace issues after "." in manual. 2012-12-05 14:27:56 -08:00
internals.texi Add a module function to open a file descriptor connected to a pipe. 2020-03-26 21:47:25 +01:00
intro.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
keymaps.texi Add new help command describe-keymap 2020-02-04 02:04:20 +01:00
lay-flat.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
lists.texi Clarify lexvar restrictions for add-to-ordered-list, add-to-history 2020-02-02 12:52:44 +01:00
loading.texi Merge from origin/emacs-27 2020-01-01 01:08:16 +00:00
macros.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
Makefile.in Prefer saying "Info manual" to "info page" in docs 2020-01-23 14:44:27 +01:00
maps.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
markers.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
minibuf.texi Merge from origin/emacs-27 2020-03-07 07:50:28 -08:00
modes.texi Add and remove backslashes in regexps 2020-02-20 16:03:30 +01:00
nonascii.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
numbers.texi Clarify when fixnums are used. 2020-02-17 13:54:36 -08:00
objects.texi Merge from origin/emacs-27 2020-01-28 07:50:22 -08:00
os.texi Merge from origin/emacs-27 2020-03-08 00:20:57 -08:00
package.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
positions.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
processes.texi Add a module function to open a file descriptor connected to a pipe. 2020-03-26 21:47:25 +01:00
README Update copyright year to 2020 2020-01-01 00:59:52 +00:00
records.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
searching.texi Simplify rx example in manual 2020-03-09 16:00:18 +01:00
sequences.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
spellfile Update lispref spellfile 2019-06-04 08:34:16 -07:00
streams.texi * doc/lispref/streams.texi (Output Functions): Improve indexing. 2020-01-25 19:15:32 +01:00
strings.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
symbols.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
syntax.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
text.texi Fix display of minibuffer prompt in ido.el 2020-02-12 21:39:44 +02:00
threads.texi Update copyright year to 2020 2020-01-01 00:59:52 +00:00
tips.texi ; bug#39779: Fix some typos in documentation. 2020-02-28 15:21:55 +02:00
two-volume-cross-refs.txt Update copyright year to 2020 2020-01-01 00:59:52 +00:00
two-volume.make Update copyright year to 2020 2020-01-01 00:59:52 +00:00
variables.texi Document changes in lexical-binding 2020-03-07 13:32:52 +02:00
windows.texi Fix sxhash-equal on bytecodes, markers, etc. 2020-01-07 11:29:42 -08:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2020 Free Software Foundation, Inc.  -*- outline -*-
See the end of the file for license conditions.


README for the Emacs Lisp Reference Manual.

* This directory contains the texinfo source files for the Emacs Lisp
Reference Manual.

* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
To ask questions, use the help-gnu-emacs mailing list.

* The Emacs Lisp Reference Manual is quite large.  It totals around
1100 pages in smallbook format; the info files total around 3.0 megabytes.

* You can format this manual for Info, for printing hardcopy using TeX,
or for HTML.

* You can buy nicely printed copies from the Free Software Foundation.
Buying a manual from the Free Software Foundation helps support our GNU
development work.  See <https://shop.fsf.org/>.
(At time of writing, this manual is out of print.)

* The master file for formatting this manual for Tex is called 'elisp.texi'.
It contains @include commands to include all the chapters that make up
the manual.

* This distribution contains a Makefile that you can use with GNU Make.

** To make an Info file, you need to install Texinfo, then run 'make info'.

** Use 'make elisp.pdf' or 'make elisp.html' to create PDF or HTML versions.


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/>.