diff options
| author | Eli Zaretskii | 2025-09-20 12:32:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-09-20 12:32:21 +0300 |
| commit | 40adabe2ef8787daa375eaddfb1e265ef5fb18a3 (patch) | |
| tree | 25968c6d85d67e7ea2c25144b56a451ff8c970da /src/process.c | |
| parent | 65fb5798960201d247063f38c460a69253a00264 (diff) | |
| download | emacs-40adabe2ef8787daa375eaddfb1e265ef5fb18a3.tar.gz emacs-40adabe2ef8787daa375eaddfb1e265ef5fb18a3.zip | |
Improve documentation of 'accept-process-output'
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output): Document better the
meaning of the timeout of 'accept-process-output' a,d the fact
that it doesn't always return as soon as some output is available.
See https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00750.html
for more details.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 75416b8e52a..2804409f51e 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4865,7 +4865,7 @@ deactivate_process (Lisp_Object proc) | |||
| 4865 | DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, | 4865 | DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, |
| 4866 | 0, 4, 0, | 4866 | 0, 4, 0, |
| 4867 | doc: /* Allow any pending output from subprocesses to be read by Emacs. | 4867 | doc: /* Allow any pending output from subprocesses to be read by Emacs. |
| 4868 | It is given to their filter functions. | 4868 | The subprocess output is given to the respective process filter functions. |
| 4869 | Optional argument PROCESS means to return only after output is | 4869 | Optional argument PROCESS means to return only after output is |
| 4870 | received from PROCESS or PROCESS closes the connection. | 4870 | received from PROCESS or PROCESS closes the connection. |
| 4871 | 4871 | ||
| @@ -4880,7 +4880,13 @@ from PROCESS only, suspending reading output from other processes. | |||
| 4880 | If JUST-THIS-ONE is an integer, don't run any timers either. | 4880 | If JUST-THIS-ONE is an integer, don't run any timers either. |
| 4881 | Return non-nil if we received any output from PROCESS (or, if PROCESS | 4881 | Return non-nil if we received any output from PROCESS (or, if PROCESS |
| 4882 | is nil, from any process) before the timeout expired or the | 4882 | is nil, from any process) before the timeout expired or the |
| 4883 | corresponding connection was closed. */) | 4883 | corresponding connection was closed. |
| 4884 | |||
| 4885 | Note that it is not guaranteed that this function will return as | ||
| 4886 | soon as some output is received. In particular, if PROCESS is nil, | ||
| 4887 | the function should not be expected to return before the timeout | ||
| 4888 | expires. The main purpose of this function is to allow process output | ||
| 4889 | to be read by Emacs, not to return as soon as any output is read. */) | ||
| 4884 | (Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, | 4890 | (Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, |
| 4885 | Lisp_Object just_this_one) | 4891 | Lisp_Object just_this_one) |
| 4886 | { | 4892 | { |