From 583d8b3cfe2401c7643f5d651b30b43bd9937f05 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 19 Oct 2008 12:29:22 +0000 Subject: [PATCH] (Synchronous Processes): Document `process-lines'. --- doc/lispref/ChangeLog | 4 +++- doc/lispref/processes.texi | 17 ++++++++++++++++- etc/NEWS | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ad3a9cfb05c..619dfcc5a2f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,7 +1,9 @@ 2008-10-19 Eli Zaretskii + * processes.texi (Synchronous Processes): Document `process-lines'. + * customize.texi (Variable Definitions): Document - custom-reevaluate-setting. + `custom-reevaluate-setting'. 2008-10-18 Martin Rudalics diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 82f27f46264..76916043987 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 5bb8d829e2c..20d71c89c2f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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. -- 2.39.5