(Synchronous Processes): Document `process-lines'.

This commit is contained in:
Eli Zaretskii 2008-10-19 12:29:22 +00:00
parent 437706cd52
commit 583d8b3cfe
3 changed files with 20 additions and 2 deletions

View file

@ -1,7 +1,9 @@
2008-10-19 Eli Zaretskii <eliz@gnu.org>
* processes.texi (Synchronous Processes): Document `process-lines'.
* customize.texi (Variable Definitions): Document
custom-reevaluate-setting.
`custom-reevaluate-setting'.
2008-10-18 Martin Rudalics <rudalics@gmx.at>

View file

@ -65,7 +65,7 @@ Processes}.
@node Subprocess Creation
@section Functions that Create Subprocesses
There are three functions that create a new subprocess in which to run
There are three primitives that create a new subprocess in which to run
a program. One of them, @code{start-process}, creates an asynchronous
process and returns a process object (@pxref{Asynchronous Processes}).
The other two, @code{call-process} and @code{call-process-region},
@ -449,6 +449,21 @@ This function executes @var{command} (a string) as a shell command,
then returns the command's output as a string.
@end defun
@defun process-lines program &rest args
This function runs @var{program} in a separate process, waits for it
to finish, and returns its output as a list of strings. Each string
in the list holds a single line of text output by the program; the
end-of-line characters are stripped from each line. The arguments
beyond @var{program}, @var{args}, are strings that specify
command-line arguments with which to run the program.
If @var{program} exits with a non-zero exit status, this function
signals an error.
This function works by calling @code{call-process}, so program output
is decoded in the same way as for @code{call-process}.
@end defun
@node Asynchronous Processes
@section Creating an Asynchronous Process
@cindex asynchronous subprocess

View file

@ -1324,6 +1324,7 @@ but obeys file handlers. The file handler is chosen based on
and `process-file-shell-command' are also new; they call internally
`start-file-process' and `process-file', respectively.
+++
*** The new function `process-lines' executes an external program and
returns its output as a list of lines.