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

Re: timeout on y-or-n-p -- prob



> It looks to me like a bug in read-char-no-hang, although I feel that
> is a hastyconclusion.  Is there a known bug in read-char-no-hang? 

Not a bug -- your tty (or whatever the MCL equivalent is) is probably
doing buffered line input. You need to turn off the buffering for it
to work.

[It is a matter of religious preference whether one considers this
aspect of read-char-no-hang to be a bug or not. I feel that there
should either be a version that turns off buffering for the duration,
at at least convenient mechanisms to turn buffering on and off and
specify what happens to any buffered characters. In some lisps
read-char-no-hang works as you want; in others you have to write code
to put the tty into and out of CBREAK mode.]

--mark