Subject: *error-output* and *debug-io*

From: [email-masked] (Joerg Hoehle)
Date: Wed, 1 Jul 1998 11:36:34 +0200

Hi,

I was just reading Peter Norvig and Kent Pitman's Tutorial on good
Lisp programming style from http://www.norwig.com/.

It says p.36:
--------
Use *error-output* for warnings and error messages that are not
accompanied by any user interaction.

Use *debug-io* for interactive warnings, error-messages, and other
interactions not related to the normal function of a program.

In particular, do not first print a message on *error-output* and then
do a debugging session on *debug-io*, expecting those to be the same
stream.  Instead, do each interaction consistently on one stream.
--------

I didn't check the latest release but I think CLISP's error routines
still print the error message to *error-output* and then proceed to
the debugger in *debug-io* (user1.lsp).

I think the advocated behaviour is better than current CLISP's.  The
Amiga makes it trivial to attach different console windows to each of
*...-i/o* and doing so I've already been disturbed by the uncohesive
(mathematically) output to two distinct streams/windows.

Ok, I'll provide a patch sometime.

Regards,
	Jo"rg Ho"hle.
[email-masked]		http://zeus.gmd.de/~hoehle/amiga-clisp.html

---

From: Bruno Haible <[email-masked]>
Date: Wed, 15 Jul 1998 19:02:52 +0200 (MET DST)

> stream.  Instead, do each interaction consistently on one stream.

This advice is not coherent with the ANSI CL specification, in the case
of interactive warnings (when *break-on-signals* is true):

   The value of *error-output*, called error output, is a stream to
   which warnings and non-interactive error messages should be sent.

> the debugger in *debug-io* (user1.lsp).

Yes, this is how clisp does it (see conditio.lsp as well).

> (mathematically) output to two distinct streams/windows.

I think the spec and Norvig's advice are both totally messy. In their
model, the semantics of *error-output* depend on both *break-on-signals*
and on the nature of *terminal-io*. And they are unsatisfactory, because
*error-output* is typically redirected to a log file, and if some error
messages don't show up in the log file, the log file is useless.
(Redirecting *debug-io* to the same or another log file doesn't make sense.)

CLISP's behaviour is to always output a non-handled error to *error-output*.
To improve the *debug-io* output, it could be modified to send the error
message to *debug-io* as well, if *debug-io* differs from *error-output*.

Bruno