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

problems with INTERACTIVE-STREAM-P



>>>>> "NS" == nathan  <nathan@bristol.st.com> writes:

NS> (if (interactive-stream-p *error-output*) ... output progress  messages)

NS> I notice the NEWS file contains the 22June1994 comment 

* The function INTERACTIVE-STREAM-P knows that if the terminal stream is
  referring to a regular file (via input redirection) it is not
  interactive.

NS> Implying that it should work.

Well, it is qualified with "via input redirection", which does work
(with bourne shell):

$ clisp -q -x '(interactive-stream-p *error-output*)' 2>out 0<&2
NIL

And dpANS does pretty much state that interactivity is analogous to input:

*
     The stream is connected to a person (or equivalent) in such a way
     that the program can prompt for information and expect to receive
     different input depending on the prompt.

*
     The program is expected to prompt for input and support "normal input
     editing".

*
     read-char might wait for the user to type something before returning
     instead of immediately returning a character or end-of-file.