Hello Developers,
I'm writing a plugin in which I invoke external unix command from
TeXmacs. In the plugin I use bits of Scheme source code (written
originally by Henri and/or Chad Brown):
;; UNIX commands. To invoke a command from TeXmacs.
(begin
(use-modules (ice-9 popen))
(define (unix-command cmd)
(let* ((p (open-input-pipe cmd))
(out (read-delimited "" p)))
(if (eof-object? out) "" (string-split out #\newline)))))
I use it like that:
(unix-command "dot -Tps temp.mathlang.dra2dg.dot -o
temp.mathlang.dra2dg.ps")
(unix-command "gv temp.mathlang.dra2dg.ps")
However, I can't do much of the viewed file with gv, e.g. I can't resize
the gv window, or even go back and work within TeXmacs, unless I close
the window.
I guess the problem is with the opened-pipe ((open-input-pipe cmd)) and
(eof-object? out). I tried to close the pipe with command (close-pipe)
but it didn't work.
Hope I was clear and somebody could help me with that.
Kind Regards,
Krzysztof Retel
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev