Fork me on GitHub
#cider
<
2018-05-01
>
reefersleep14:05:22

Does anyone know how to prevent the repl from prefixing maps with the namespace part of keywords?

dpsutton14:05:37

there's a clojure option for that

dpsutton14:05:41

let me look it up

reefersleep14:05:47

#:person{:age 15, :name “john”}

reefersleep14:05:05

thanks @dpsutton. I find it quite annoying 🙂

reefersleep14:05:10

And couldn’t find anything on google

dpsutton14:05:50

*print-namespace-maps*

dpsutton14:05:56

i had to go the the jira ticket by bronsa

reefersleep14:05:16

cheers 👏 how do you toggle it?

dpsutton14:05:29

i think just (set x false)

reefersleep14:05:58

my savior 😄

reefersleep14:05:45

wait, it doesn’t work! spoke too soon 🙂

reefersleep14:05:57

set! doesn’t seem to have any effect

dominicm14:05:08

I wonder if fipp behaves differently?

reefersleep14:05:36

my.ns>(set! *print-namespace-maps* false)
false
my.ns> *print-namespace-maps*
true

reefersleep14:05:38

(binding [*print-namespace-maps* false] does not work either

dpsutton14:05:13

i'd ask in #clojure

dpsutton15:05:03

so it doesn't work in lein repl. i'm guessing this is a thread based issue

dpsutton15:05:12

it does work with clj so they won't be too helpful i don't think

dominicm15:05:44

I think it's an nrepl/session thing

dpsutton15:05:53

yeah. i think each eval is in its own thread in nrepl. and these bindings won't carry over

dominicm15:05:46

kinda. The thread bindings get serialized into a "session" concept, they're forkable though. I'm guessing that a disposed session is being used for each eval in the repl.

dpsutton15:05:05

oh ok. i need to read that, especially if its gonna come under the clojure-emacs umbrella

arrdem18:05:20

I think *print-namespace-maps* may not be correctly captured and persisted across eval requests… I had some difficulty turning this behavior off (I really dislike it too) but didn’t take the time to dig into why.

dominicm20:05:36

It uses the clojure function which gets all bindings.