Next: , Previous: , Up: Streams   [Contents][Index]

5.24.2 Output Streams

These are the different types of output stream, for the functions which use them see Output Functions.


Writes to the file object file. See Files.


The function function is called with one argument, either a string or a character. This should be used as the circumstances dictate. If the function returns a number it is the number of characters actually used, otherwise it is assumed that all the characters were successful.


Writes to the standard input of the process object process. If process isn’t running an error is signalled. See Processes.


Appends the character(s) to the end of the status line message.


Write to the stream stored in the variable standard-output.

It is also possible to store the characters sent to an output stream in a string.

Function: make-string-output-stream

Returns an output stream. It accumulates the text sent to it for the benefit of the get-output-stream-string function.

Function: get-output-stream-string string-output-stream

Returns a string consisting of the text sent to the string-output-stream since the last call to get-output-stream-string (or since this stream was created by make-string-output-stream).

(setq stream (make-string-output-stream))
    ⇒ ("" . 0)
(prin1 keymap-path stream)
    ⇒ ("(lisp-mode-keymap global-keymap)" . 64)
(get-output-stream-string stream)
    ⇒ "(lisp-mode-keymap global-keymap)"
Variable: standard-output

This variable contains the output stream which is used when no other is specified (or when the given output stream is false).

Variable: standard-error

This variable contains the output stream which is used when an error message is being reported.

Applications that embed Librep, or dynamically loaded extensions, may provide further output stream types.

Next: , Previous: , Up: Streams   [Contents][Index]