Tagged literals printed incorrectly, space removed
Cursive prints tagged literals without a space between the tag and the literal. This is usually fine, except when the literal is a symbol.
From a REPL in Cursive:
(tagged-literal 'foo 'bar)
=> #foobar
This is invalid and unreadable.
From a command line REPL:
user=> (tagged-literal 'foo 'bar)
#foo bar
It seems as though Cursive is processing the tagged literal and removing the space (possibly related to flare detection?)
I know what you are thinking... tagged literals on symbols?
There is a popular library that improves Clojure printing output (among other features) called clojure-plus by @tonsky https://github.com/tonsky/clojure-plus.
(require 'clojure+.print)
(clojure+.print/install!)
inc
=> #fnclojure.core/inc
The idea is great, it improves the output significantly... but in Cursive the space removal makes it both annoying and breaks the write/read symmetry.
Also, the inline rendered version omits the function name in some cases:
but at the REPL looks like this:
default-print-method => #fn clojure.plus.print.objects.objects-and-protocols/eval53529/fn--53530
Notice that there are 2 slashes in the symbol, which is not allowed. That's a bug in clojure-plus, not Cursive and probably the cause of that problem.
Related:
Here I create an invalid symbol (it contains multiple slashes) and Cursive can display it in the REPL, but not in the inline results.
Fix released in 2025.2-eap1 on 2025-05-22.
thank you!
Fix released in 2025.2 on 2025-08-04.