From: jakemiles
Subject: Emacs + slime + clisp + (listen) = pipelined request eval message
Date: 
Message-ID: <1161622075.553722.147020@i42g2000cwa.googlegroups.com>
Hello.  I'm trying to figure out how to get the following function to
work in Lisp In a Box on a PC (Emacs + slime + clisp).  It works
correctly in LispWorks Personal.

(defun think-and-listen ()
               (sleep 0.2)
               (print "Thinking...")
               (if (listen)
                   (read)
                 (think-and-listen)))

In LispWorks, it exhibits the correct behavior: It keeps printing
Thinking..., pausing 0.2 seconds each time, and when I type ( it stops,
waits for me to complete the expression with 1 1), and then replies (1
1).

In Lisp In a Box however, when I type ( it keeps looping and printing
Thinking...  When I complete the lisp expression and hit return it
prints some of the Thinkings in bold but then keeps looping.  As I type
the characters it outputs them amid the Thinkings.  CR, Ctrl-C, Crtl-D
- nothing I do stops the loop except Ctrl-X Ctrl-C (exiting Emacs).
When i type the open paren, the minibuffer says

pipelined request eval: "(

I need to figure out how to get this to work under this configuration,
because it's what my instructor will be using to run my project.  Does
anyone know what's going on?  If there's a way to achieve this same
affect with different functions, I'm open to that too.

Thank you for any help.  My grade actually depends on this little loop
working.  See the P.S. for an explanation of why.

- Jake

P.S: The project is a two-player game in which the program is searching
ahead in the game for the best next move.  Rather than only look ahead
when it's the computer's turn, I want it to just keep searching
constantly from the moment the game starts until it ends, pausing
occasionally to output its best move and to read the user's move.  It's
this last part that I can't get to work in Lisp In A Box.  I just need
to be able to loop and then stop the loop when it detects keyboard
input.  Otherwise my project will only be able to search half the time,
and my grade will drop significantly as a consequence.  Please help!