diff options
| author | Glenn Morris | 2019-08-20 09:04:53 -0700 |
|---|---|---|
| committer | Glenn Morris | 2019-08-20 09:04:53 -0700 |
| commit | af103ef3c9d6df07475e2b3a2f846246d7fd2a8b (patch) | |
| tree | a7e0a0cb7db56b68b8b3a0c3c29a6b90d61edff7 /doc | |
| parent | 989c85e799b7c3a425d3d03f98ecd55d5cf76022 (diff) | |
| parent | 615cff42580a3521c1a4ea7c3ec467eb8259e1c7 (diff) | |
| download | emacs-af103ef3c9d6df07475e2b3a2f846246d7fd2a8b.tar.gz emacs-af103ef3c9d6df07475e2b3a2f846246d7fd2a8b.zip | |
Merge from origin/emacs-26
615cff4 (origin/emacs-26) Fix process filter documentation (Bug#13400)
beb1d22 Fix query-replace-regexp undo feature
# Conflicts:
# test/lisp/replace-tests.el
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/processes.texi | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 7a696f7c3ea..21bc32e88b6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -596,9 +596,8 @@ process}. After an asynchronous process is created, it runs in | |||
| 596 | parallel with Emacs, and Emacs can communicate with it using the | 596 | parallel with Emacs, and Emacs can communicate with it using the |
| 597 | functions described in the following sections (@pxref{Input to | 597 | functions described in the following sections (@pxref{Input to |
| 598 | Processes}, and @pxref{Output from Processes}). Note that process | 598 | Processes}, and @pxref{Output from Processes}). Note that process |
| 599 | communication is only partially asynchronous: Emacs sends data to the | 599 | communication is only partially asynchronous: Emacs sends and receives |
| 600 | process only when certain functions are called, and Emacs accepts data | 600 | data to and from a process only when those functions are called. |
| 601 | from the process only while waiting for input or for a time delay. | ||
| 602 | 601 | ||
| 603 | @cindex pty, when to use for subprocess communications | 602 | @cindex pty, when to use for subprocess communications |
| 604 | @cindex pipe, when to use for subprocess communications | 603 | @cindex pipe, when to use for subprocess communications |
| @@ -1245,8 +1244,9 @@ the defaulting mechanism (@pxref{Default Coding Systems}). | |||
| 1245 | because the input buffer is full. When this happens, the send functions | 1244 | because the input buffer is full. When this happens, the send functions |
| 1246 | wait a short while, accepting output from subprocesses, and then try | 1245 | wait a short while, accepting output from subprocesses, and then try |
| 1247 | again. This gives the subprocess a chance to read more of its pending | 1246 | again. This gives the subprocess a chance to read more of its pending |
| 1248 | input and make space in the buffer. It also allows filters, sentinels | 1247 | input and make space in the buffer. It also allows filters (including |
| 1249 | and timers to run---so take account of that in writing your code. | 1248 | the one currently running), sentinels and timers to run---so take |
| 1249 | account of that in writing your code. | ||
| 1250 | 1250 | ||
| 1251 | In these functions, the @var{process} argument can be a process or | 1251 | In these functions, the @var{process} argument can be a process or |
| 1252 | the name of a process, or a buffer or buffer name (which stands | 1252 | the name of a process, or a buffer or buffer name (which stands |
| @@ -1461,9 +1461,10 @@ output, Emacs won't receive that output. | |||
| 1461 | 1461 | ||
| 1462 | Output from a subprocess can arrive only while Emacs is waiting: when | 1462 | Output from a subprocess can arrive only while Emacs is waiting: when |
| 1463 | reading terminal input (see the function @code{waiting-for-user-input-p}), | 1463 | reading terminal input (see the function @code{waiting-for-user-input-p}), |
| 1464 | in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), and in | 1464 | in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), in |
| 1465 | @code{accept-process-output} (@pxref{Accepting Output}). This | 1465 | @code{accept-process-output} (@pxref{Accepting Output}), and in |
| 1466 | minimizes the problem of timing errors that usually plague parallel | 1466 | functions which send data to processes (@pxref{Input to Processes}). |
| 1467 | This minimizes the problem of timing errors that usually plague parallel | ||
| 1467 | programming. For example, you can safely create a process and only | 1468 | programming. For example, you can safely create a process and only |
| 1468 | then specify its buffer or filter function; no output can arrive | 1469 | then specify its buffer or filter function; no output can arrive |
| 1469 | before you finish, if the code in between does not call any primitive | 1470 | before you finish, if the code in between does not call any primitive |
| @@ -1639,14 +1640,10 @@ outputs directly to the process buffer. | |||
| 1639 | By default, the error output from the process, if any, is also | 1640 | By default, the error output from the process, if any, is also |
| 1640 | passed to the filter function, unless the destination for the standard | 1641 | passed to the filter function, unless the destination for the standard |
| 1641 | error stream of the process was separated from the standard output | 1642 | error stream of the process was separated from the standard output |
| 1642 | when the process was created (@pxref{Output from Processes}). | 1643 | when the process was created. Emacs will only call the filter |
| 1643 | 1644 | function during certain function calls. @xref{Output from Processes}. | |
| 1644 | The filter function can only be called when Emacs is waiting for | 1645 | Note that if any of those functions are called by the filter, the |
| 1645 | something, because process output arrives only at such times. Emacs | 1646 | filter may be called recursively. |
| 1646 | waits when reading terminal input (see the function | ||
| 1647 | @code{waiting-for-user-input-p}), in @code{sit-for} and | ||
| 1648 | @code{sleep-for} (@pxref{Waiting}), and in | ||
| 1649 | @code{accept-process-output} (@pxref{Accepting Output}). | ||
| 1650 | 1647 | ||
| 1651 | A filter function must accept two arguments: the associated process | 1648 | A filter function must accept two arguments: the associated process |
| 1652 | and a string, which is output just received from it. The function is | 1649 | and a string, which is output just received from it. The function is |