Problem with strings containing parentheses

65 views
Skip to first unread message

Torsten Anders

unread,
May 17, 2014, 11:55:28 AM5/17/14
to clojur...@googlegroups.com
Dear all,

Hopefully this is the right forum for this question.

I ran into some unexpected behaviour when using parentheses within strings (I want to generate code for some other language programmatically). 

For example, when I evaluate one of the following strings in CIDER (Emacs), then the REPL seems to block.

"()"
"("
")"

Seemingly, also LightTable blocks on such strings. By contrast, lein repl just returns the string as expected. 

As mentioned, I am writing some code that generates some other programming language code. Interestingly, strings containing parentheses are seemingly not a principle problem (I am using CIDER most of the time). As part of a larger program such strings can be printed, and saved to a file. Only certain sub-parts of the program can not be evaluated individually, due to the above problem. 

Any idea how to avoid this problem? Is this a bug in some REPLs, is it me missing something, or... ?

Thanks a lot! 

Best,
Torsten Anders


--

Dr Torsten Anders

Course Leader, Music Technology

University of Bedfordshire

Park Square, Room A315

http://www.torsten-anders.de


Michael Griffiths

unread,
May 17, 2014, 1:20:48 PM5/17/14
to clojur...@googlegroups.com
Do you have cider-repl-use-clojure-font-lock set to t? This might be a known issue: https://github.com/clojure-emacs/cider/issues/550

Torsten Anders

unread,
May 19, 2014, 6:28:01 AM5/19/14
to clojur...@googlegroups.com

Dear Michael,

Thank you very much for your response. I now changed the value of  cider-repl-use-clojure-font-lock to nil, and the evaluation of strings like ")" and (. "(" (toString)) now seem to work in the CIDER repl buffer.

However, it still does not within a Clojure file buffer. Seemingly it blocks or is completely ignored, unlike evaluating other expressions in a Clojure file. 

Perhaps I have to live with that :)

Thanks a lot for your help!

Best,

Torsten

Bozhidar Batsov

unread,
Aug 1, 2014, 5:55:06 AM8/1/14
to clojur...@googlegroups.com
This was a clojure-mode that's already fixed. I'd suggest reporting CIDER-related problems on its own mailing list or even better - on its issue tracker.
Reply all
Reply to author
Forward
0 new messages