inf-clojure

Shantanu Kumar 2021-07-14T14:07:56.001100Z

Hi, can anybody tell me the shortcut for set-ns (equiv to (in-ns ..)) in inf-clojure?

dpsutton 2021-07-14T14:09:29.002Z

if your cursor is in a file, you can C-c M-r to require that namespace and then C-c M-n to put the repl in that namespace

dpsutton 2021-07-14T14:10:35.002600Z

the former is inf-clojure-reload and the latter is inf-clojure-set-ns

Shantanu Kumar 2021-07-14T14:17:44.003800Z

@dpsutton Thanks! I was looking at the help page (C-h f inf-clojure-mode) but it doesn't list these things. Where can I find a list of key bindings?

dpsutton 2021-07-14T14:18:56.004100Z

i was gonna point you at the readme but its not there.

Shantanu Kumar 2021-07-14T14:20:36.005200Z

BTW, when I press C-c M-n It says set-ns not configured for socket (I entered REPL type socket) during inf-clojure-connect

dpsutton 2021-07-14T14:21:52.005600Z

oh yeah, that's not a valid repl type. What kind of repl are you connecting to?

dpsutton 2021-07-14T14:23:05.007100Z

it only needs to know for how to query the repl. ie clojure.repl/doc, etc. babashka, lumo, planck, cljs, and clojure all have different ways to do some things. so it's important to set what type you are using, not that its a socket repl. You can evaluate (setq inf-clojure-repl-type 'clojure) in the repl buffer to fix it

Shantanu Kumar 2021-07-14T14:23:13.007300Z

I started Socket-REPL using Leiningen by specifying :jvm-opts

dpsutton 2021-07-14T14:23:21.007500Z

ok. is it a clojure repl?

Shantanu Kumar 2021-07-14T14:23:26.007700Z

Yes

dpsutton 2021-07-14T14:23:42.008100Z

cool. all inf-clojure cares about is that it's a clojure repl. so run (setq inf-clojure-repl-type 'clojure) in the repl buffer

Shantanu Kumar 2021-07-14T14:29:13.009500Z

OK, so just evaluating (setq ..) didn't work, but I disconnected inf-clojure and connected again with Socket-type: clojure then C-c M-n worked. Thanks again!

👍 1