mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-12 09:28:24 +00:00
Improve documentation of streams in batch mode
* doc/lispref/os.texi (Batch Mode): * doc/lispref/streams.texi (Input Streams, Output Streams): Better documentation of I/O streams in batch mode, with more cross-references.
This commit is contained in:
parent
34feded008
commit
32090a3de4
@ -2609,14 +2609,14 @@ calls @var{function} with no arguments, or @samp{--eval=@var{form}}.
|
||||
|
||||
Any Lisp program output that would normally go to the echo area,
|
||||
either using @code{message}, or using @code{prin1}, etc., with
|
||||
@code{t} as the stream, goes instead to Emacs's standard descriptors
|
||||
when in batch mode: @code{message} writes to the standard error
|
||||
descriptor, while @code{prin1} and other print functions write to the
|
||||
standard output. Similarly, input that would normally come from the
|
||||
minibuffer is read from the standard input descriptor. Thus, Emacs
|
||||
behaves much like a noninteractive application program. (The echo
|
||||
area output that Emacs itself normally generates, such as command
|
||||
echoing, is suppressed entirely.)
|
||||
@code{t} as the stream (@pxref{Output Streams}), goes instead to
|
||||
Emacs's standard descriptors when in batch mode: @code{message} writes
|
||||
to the standard error descriptor, while @code{prin1} and other print
|
||||
functions write to the standard output. Similarly, input that would
|
||||
normally come from the minibuffer is read from the standard input
|
||||
descriptor. Thus, Emacs behaves much like a noninteractive
|
||||
application program. (The echo area output that Emacs itself normally
|
||||
generates, such as command echoing, is suppressed entirely.)
|
||||
|
||||
Non-ASCII text written to the standard output or error descriptors is
|
||||
by default encoded using @code{locale-coding-system} (@pxref{Locales})
|
||||
|
@ -123,13 +123,13 @@ came from. In this case, it makes no difference what value
|
||||
@code{t} used as a stream means that the input is read from the
|
||||
minibuffer. In fact, the minibuffer is invoked once and the text
|
||||
given by the user is made into a string that is then used as the
|
||||
input stream. If Emacs is running in batch mode, standard input is used
|
||||
instead of the minibuffer. For example,
|
||||
input stream. If Emacs is running in batch mode (@pxref{Batch Mode}),
|
||||
standard input is used instead of the minibuffer. For example,
|
||||
@example
|
||||
(message "%s" (read t))
|
||||
@end example
|
||||
will read a Lisp expression from standard input and print the result
|
||||
to standard output.
|
||||
will in batch mode read a Lisp expression from standard input and
|
||||
print the result to standard output.
|
||||
|
||||
@item @code{nil}
|
||||
@cindex @code{nil} input stream
|
||||
@ -392,13 +392,15 @@ is responsible for storing the characters wherever you want to put them.
|
||||
|
||||
@item @code{t}
|
||||
@cindex @code{t} output stream
|
||||
The output characters are displayed in the echo area.
|
||||
The output characters are displayed in the echo area. If Emacs is
|
||||
running in batch mode (@pxref{Batch Mode}), the output is written to
|
||||
the standard output descriptor instead.
|
||||
|
||||
@item @code{nil}
|
||||
@cindex @code{nil} output stream
|
||||
@code{nil} specified as an output stream means to use the value of
|
||||
@code{standard-output} instead; that value is the @dfn{default output
|
||||
stream}, and must not be @code{nil}.
|
||||
@code{nil} specified as an output stream means to use the value of the
|
||||
@code{standard-output} variable instead; that value is the
|
||||
@dfn{default output stream}, and must not be @code{nil}.
|
||||
|
||||
@item @var{symbol}
|
||||
A symbol as output stream is equivalent to the symbol's function
|
||||
|
Loading…
Reference in New Issue
Block a user