mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -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. |
||
|---|---|---|
| .. | ||
| charsets | ||
| e | ||
| forms | ||
| gnus | ||
| images | ||
| nxml | ||
| org | ||
| refcards | ||
| schema | ||
| srecode | ||
| themes | ||
| tutorials | ||
| AUTHORS | ||
| CALC-NEWS | ||
| ChangeLog.1 | ||
| compilation.txt | ||
| COPYING | ||
| DEBUG | ||
| DEVEL.HUMOR | ||
| DISTRIB | ||
| edt-user.el | ||
| emacs-buffer.gdb | ||
| emacs.appdata.xml | ||
| emacs.desktop | ||
| emacs.icon | ||
| emacs.service | ||
| enriched.txt | ||
| ERC-NEWS | ||
| ETAGS.EBNF | ||
| ETAGS.README | ||
| future-bug | ||
| gnus-tut.txt | ||
| grep.txt | ||
| HELLO | ||
| HISTORY | ||
| JOKES | ||
| MACHINES | ||
| MH-E-NEWS | ||
| NEWS | ||
| NEWS.1-17 | ||
| NEWS.18 | ||
| NEWS.19 | ||
| NEWS.20 | ||
| NEWS.21 | ||
| NEWS.22 | ||
| NEWS.23 | ||
| NEWS.24 | ||
| NEWS.25 | ||
| NEWS.26 | ||
| NEWS.27 | ||
| NEXTSTEP | ||
| NXML-NEWS | ||
| ORG-NEWS | ||
| package-keyring.gpg | ||
| PROBLEMS | ||
| ps-prin0.ps | ||
| ps-prin1.ps | ||
| publicsuffix.txt | ||
| README | ||
| rgb.txt | ||
| ses-example.ses | ||
| spook.lines | ||
| TERMS | ||
| TODO | ||
| yow.lines | ||
This directory contains the architecture-independent files used by or with Emacs. This includes some text files of documentation for GNU Emacs or of interest to Emacs users, and the file of dumped docstrings for Emacs functions and variables. COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES File: emacs.icon Author: Sun Microsystems, Inc Copyright (C) 1999, 2001-2020 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING)