From 022fb3f287d4fd351078f2b134d187ff584b380c Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 26 Jul 2019 23:20:37 -0400 Subject: [PATCH] Note that process filter can be called recursively (Bug#13400) * doc/lispref/processes.texi (Output from Processes): Note that functions which send data may also trigger reading from processes. (Filter Functions): Note that filter functions may be called recursively. --- doc/lispref/processes.texi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index a93f4db428..208005772e 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1416,9 +1416,10 @@ Output from Processes Output from a subprocess can arrive only while Emacs is waiting: when reading terminal input (see the function @code{waiting-for-user-input-p}), -in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), and in -@code{accept-process-output} (@pxref{Accepting Output}). This -minimizes the problem of timing errors that usually plague parallel +in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), in +@code{accept-process-output} (@pxref{Accepting Output}), and in +functions which send data to processes (pxref{Input to Processes}). +This minimizes the problem of timing errors that usually plague parallel programming. For example, you can safely create a process and only then specify its buffer or filter function; no output can arrive before you finish, if the code in between does not call any primitive @@ -1683,6 +1684,10 @@ Filter Functions or more batches of output; one way to do this is to insert the received text into a temporary buffer, which can then be searched. +Note that if the filter calls a function which can wait for process +output (pxref{Output from Processes}), the filter may be called +recursively. + @defun set-process-filter process filter This function gives @var{process} the filter function @var{filter}. If @var{filter} is @code{nil}, it gives the process the default filter, -- 2.11.0