The script can be made to work in Gimp by adding one line:
(define (script-fu-exp-medit inFileName inPas)
(define (subscript tour p)
(set-output-port p) ;;; THIS IS THE ADDED LINE
((= tour 0)
I came up with this by looking at the tinyscheme source code.
In the code, if you call
(write x port)
(write-char #\space port)
as you do, and if "port" is not the current output port, then
scheme saves the value of the current port, sets the output
port to "port", performs the write, and then resets the output
port back to the old value. Your code never sets the output
port, so this set-reset sequence happens for every write and
write-char command. Furthermore, the "old value" is undefined.
I don't know enough about scheme to say whether this is a bug
in your code or in tinyscheme.
Gimp-developer mailing list