*print-readably* is a Clojure dynamic variable that controls whether printed values preserve readable syntax. It governs escapes for characters such as newline and tab, along with decorations such as string quotes. Its default is true. section 23.20
Usually, choose the printing function whose behavior you want:
- Use pr, pr-str, or related functions for readable output; these set *print-readably* to true. section 23.20
- Use print, println, or related functions for non-readable display; these set *print-readably* to false. section 23.20
- Bind the variable directly when calling code whose printing behavior you cannot change. section 23.20
Temporarily disable readable printing
(binding [*print-readably* false] (pr "a\nb\nc")) ;; a ;; b ;; cnil (print "a\nb\nc") ;; a ;; b ;; cnil Both forms display the newline characters across separate lines rather than preserving the escaped string representation.
