Group Admins

  • Profile picture of Karim
  • Profile picture of Jean

OpenMusic

Public Group active 5 hours, 15 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

print string into listener

Author 3 Subscribed Users |
Profile photo of JialinLiu
JialinLiu

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!

November 15, 2016 at 15:17 #19761
Profile photo of Jean
Jean

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

November 16, 2016 at 22:07 #19837
Profile photo of JialinLiu
JialinLiu

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

November 18, 2016 at 00:53 #19859
Profile photo of Jean
Jean

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

November 18, 2016 at 10:39 #19862
Profile photo of JialinLiu
JialinLiu

Hello Jean,

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

all the best
Jialin

November 19, 2016 at 15:38 #19866
Jérôme
Jérôme

THX Jean ! 😉

November 19, 2016 at 18:01 #19867

You must be logged in to reply to this topic.

Log in now