From: Kent M Pitman
Subject: Re: dribble question
Date: 
Message-ID: <sfw7knoy4qa.fsf@shell01.TheWorld.com>
Myriam Abramson <········@osf1.gmu.edu> writes:

> I find the dribble function very convenient to log a terminal
> session. However, the log is lost if the lisp does not terminate
> normally. Is there a way to flush the output as well? 

It's implementation-dependent how dribble does what it does, so there is 
not really a portable way to advise you.  It might work to do 
(force-output) before exiting... but it might not.  

If your problem is wanting to do the (force-output) on exit of the program,
that's also implementation-dependent.  It might work  to do
 (unwind-protect (do-the-main-computation) (force-output))
around the computation, but it might not.

I guess there are possible rare buffering issues that could lead to
(finish-output) being needed instead of (force-output).  But I think 
that's unlikely.

Talk to your vendor if that doesn't do it for you.  There are several
mutually incompatible but conforming ways of implementing dribble, and
only they will know for sure...