[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

queries about *query-io*



What should *query-io* be bound to when running Lisp in "batch mode" where
normal input comes from a script file and there is not necessarily a
terminal or interactive process associated with the Lisp process?  For the
purposes of y-or-n-p, it might be reasonable to bind *query-io* to the
script file, since these are questions expected by the user and the answers
could be included in the script file.  However, for unexpected questions
asked via yes-or-no-p, this approach would almost certainly fail.  Or,
*query-io* could be left unbound or it could be bound to an empty stream.

This leads to the second problem:  what should y-or-n-p and yes-or-no-p
do if *query-io* is unbound or has an end-of-file condition?  Since there
is no way to specify a default value to be returned, I think signalling an
error is about the only reasonable thing to do.  Comments?

-Sandra Loosemore
-------