Capturing Lisp output
Here are different methods for capturing the results of an interactive
Lisp-specific way using DRIBBLE
You tell Lisp to send a copy of everything you type and
everything the system types to the file output.text by calling
To stop recording the interactive session you call
dribble without a filename
Lisp-specific way using a user defined function
Here are two examples of lisp functions or macros that write
to a file:
Unix-specific way using script
You tell Unix to send a copy of everything you type and
everything the system types to the file output.text by using the
% script output.text
To stop recording a copy of the session you hit Control-D
Since Unix traps all the characters, if you make any typing error
the file will contain all the characters you typed, including
backspace and corrections.
The Lisp buffer, like all emacs buffers, can be saved to disk
(Use C-x C-w to save it with a new name such as Output.text), edited, etc.
So run your test cases, save the Lisp buffer, then if needed edit out
any lines that were not test cases.
The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.