Fork me on GitHub
#emacs
<
2017-06-07
>
qqq02:06:44

is there a nice way for emacs to manage two cider repls (connected to different machines/projects)

qqq02:06:53

or should I run two instances of eamcs, one for each cider repl ?

dpsutton03:06:06

i can jack in to two different projects without much issue. i'd imagine cider-connect can handle it pretty well

qqq05:06:09

Yeah, but then things like C-x C-e

qqq05:06:13

I'm not sure how that works.

qqq05:06:38

My current solution is to (1) have multiple repls running (outside emacs), (2) cider connect to one of them at a time [the other ones stay alive, as they're standalone repls]

benedek06:06:21

you can have several project jacked in in your emacs. there is a. connection browser and there is a current connection

benedek06:06:31

so as far as I remember you have to set your current connection to the right repl when you move between projects...

benedek06:06:59

or was this improved @dpsutton lately?

benedek06:06:03

if you use C-u C-x C-Z on a namespace that also selects the right repl connection for you

benedek06:06:06

above key combo is to jump to the right repl for the namespace and also set the ns in the repl

mikepjb09:06:00

Does anyone know how to do a search replace for a new line (e.g replace all commas with a newline) in emacs without using quoted-insert` (C-q C-j)

mikepjb09:06:15

coming from vimland it seems like this process should be much easier and I'm missing something like s/,/,\r

dpsutton12:06:00

the connection browser needs work. i think it just shows the session ids which isn't really helpful ha

benedek13:06:48

ta @dpsutton but is there some smartness in place to figure out to which repl to send a form to for evaluating or is it always the current repl connection?

dpsutton13:06:30

somethings call out to just (cider-current-connection) and somethings call out to cider-map-conncetions

dpsutton13:06:44

and the latter does some stuff looking by project, etc

dpsutton13:06:08

i'm not sure how smart (cider-current-connection) is as its tough to know what its value will be in any given buffer

benedek13:06:47

ok so i am bit confused for a good reason. ta for the update

dpsutton13:06:54

i have a long term goal to make the connection a required parameter at the very beginning of the interaction

dpsutton13:06:19

and that gets passed around

dpsutton13:06:31

it was a source of the clojurescript repl becoming a clojure one a while ago

dpsutton13:06:46

(defun cider--guess-cljs-connection ()
  "Hacky way to find a ClojureScript REPL.
DO NOT USE THIS FUNCTION.
It was written only to be used in `cider-map-connections', as a workaround
to a still-undetermined bug in the state-stracker backend."

mikepjb14:06:20

C-o works, it seems weird that I can't find a text visible representation of newline to use when using replace-string or replacing-regexp

jjttjj18:06:31

is there a way in cider to automatically refer-all from clojure.pprint/clojure.repl no matter what ns the repl is in?

jjttjj18:06:20

(I guess eldoc mode and cider-repl-use-pretty-printing helps but it would still be nice to auto refer in those namespaces if possible)

dpsutton18:06:14

you mean just for repl output?

dpsutton18:06:50

the worry about auto referring to those vars would be if you accidentally used the functions in your namespace it would only work under CIDER (including deploying to production)

jjttjj19:06:25

good point, for some reason i was under the impression that lein repl did that or another editor but I see that's not the case so I can see why it's best to avoid

jjttjj19:06:36

actually I used nightcode at a clojurebridge recently, which has that behavior out of the box and I kind of liked it, but I see that it's kind of unique to nightcode

oskarkv23:06:17

I'm trying to use cljr-remove-let but I'm getting the error "refactor-nrepl is unable to build an AST for game.tile-sets. tools.analyzer encountered the following problem: No namespace: user found" Anyone knows what's going on? I don't see what the user namespace has to do with anything, and it's exists too. cider-refresh works.