chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] how do I send input to an external program line-by-line?


From: Michele Simionato
Subject: [Chicken-users] how do I send input to an external program line-by-line?
Date: Tue, 31 May 2005 02:42:24 -0400

Here is what I am doing:

(use posix)
(define gnuplot-pipe (open-output-pipe "gnuplot"))

(define-macro (gnuplot . args)
  `(begin
     (for-each
      (lambda (arg)
        (write arg gnuplot-pipe)
        (display " " gnuplot-pipe)) ',args)
     (newline gnuplot-pipe)))

(gnuplot plot x)
(gnuplot replot 2*x)

(close-output-pipe gnuplot-pipe)

I am executing this line-by-line from emacs. The problems is that
all the plots are shown only at the end, when I close the pipe, and
they immediately disappear. In other word, a buffeting problem.
I tried to set (define pipe/buf 0) but I had no visible change.

Any suggestion?

        Michele Simionato




reply via email to

[Prev in Thread] Current Thread [Next in Thread]