>When eval *standard-output*, it shows #<OUTPUT UNBUFFERED FILE-STREAM >CHARACTER #P"/dev/fd/1">. I have tried ext:run-program which cannot work >too.
The problem is whether writes go there directly or via *standard-output* run-program could have :output keyword parameter to capture and redirect output. >在 Tue, 16 Oct 2012 15:19:45 +0800,Michael Raskin <38a93...@rambler.ru> >写道: > >>> The stumpwm is built using clisp-2.49. The stumpwm evaling can display >>> the >>> result of the following function with the help of >>> "with-output-to-string": >>> (Maybe i is better to hack stumpwm to do such a thing as clfswm does) >>> >>> (defun div618 (p1 p2) >>> (let ((ratio '(0. 0.191 0.236 0.382 0.5 0.618 0.809 1.)) >>> (price #'(lambda (r) (if (<= p1 p2) (+ p1 (* (- p2 p1) r)) (- >>> p1 >>> (* (- p1 p2) r)))))) >>> (with-output-to-string (*standard-output*) >>> (if (<= p1 p2) >>> (dolist (r (reverse ratio)) (format t "-------~3$ >>> ~$-------~%" r (funcall price r))) >>> (dolist (r ratio) (format t "-------~3$ ~$-------~%" r >>> (funcall price r))))))) >>> >>> However, both slime and stumpwm evaling cannot display the result of >>> (ext:shell "ls ~"). >> >> ext:shell output goes to filedescriptor 1, not even to *standard-output* >> and CLisp offers no way to redirect this. There are other way to call >> external programs with more freedom. >> >> >> > > >-- >使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/ > _______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/stumpwm-devel