< Back to IRCAM Forum

Print string into listener

Hello friends!

If I evaluate a string in Lisp-Editor, then I get a string without the double quotes in listener.
I want to know how could I print the string in original form (with quote) into listener without adding a new “write-to-string” function.
Is there probably a global variable which control the format of output?

Thanks very much!

Hi – I’m not sure about what you mean by “evaluate a string in Lisp-Editor” : do you mean “print” a string from the Lisp editor ?
Anyway, as you noticed the OM print in the Listener does not display strings, keywords etc.
The attached patch will probably do: please just copy this file in OM 6.10.1/patches/
I think I’ll keep this new print in future versions, so you probably won’t need this fix any more.
all best

redef-print.lisp (667 Bytes)

Hello Jean,

Thank you for your help and beautiful patch!
Now I can print the string with quote from lisp-editor into the listener window. That is really very convenient!

And the other thing is: I could not check the result of evaluation in new listener. I mean, if I evaluate(cmd+e) a thing like “(+ 1 1)” in lisp-editor, I could not see the result “2” in the new listener.
It could be better, if people can check the result of evaluation in listener like in the old version, without "print"ing it.

Anyway, Thanks very much. It helps me a lot!
All the best,
Jialin

right. the following patch should do it.
please remove the previous one. I forced the print output to the Listener.

redef-print-2.lisp (711 Bytes)

Hello Jean,

Now it works perfectly! Thanks for the Patch and work!

all the best
Jialin

THX Jean ! :wink: