The 'get-output-stream-list' function empties the specified 'stream' and returns this data as a list. The output stream is emptied by this operation.
(setq out (make-string-output-stream)) ; returns #<Unnamed-Stream: #...> (format out "123") ; add some data to output stream (get-output-stream-list out) ; returns (#\1 #\2 #\3) (format out "123") ; add some data to output stream (read out) ; returns 123 (get-output-stream-list out) ; returns NIL, the string was emptied by 'read'
See the
get-output-stream-list
function in the