Fork me on GitHub
#cider
<
2017-09-07
>
gonewest81805:09:21

Check the value of clojure.pprint/*print-right-margin*?

gonewest81805:09:26

huh, looks like new in cider 0.15.0, pretty printing is controlled by cider-repl-pretty-print-width and if that variable is nil then it uses`fill-column`

oskarkv07:09:07

clojure.pprint/*print-right-margin* is 72. I have tried with both cider-repl-pretty-print-width 80 and nil. My fill-column is 80

gonewest81817:09:11

Sorry, at this point I have only generic debugging suggestions. The kind of stuff you’ve already considered, i.e. can you recall when’s the last time it worked, and has anything in your environment changed since then. That kind of stuff.

oskarkv18:09:43

Hehe no problem. I can't really recall when it stopped working, but it stopped without me updating cider, and persisted even after updating yesterday.

gonewest81818:09:13

does it work in a repl that is NOT running in a lein project? what if you move aside your .lein/profiles.clj?

oskarkv19:09:45

Hm, something in my profiles.clj...

oskarkv19:09:46

Luckily it's not very big. Thank you!

magnars09:09:02

After updating cider, cider-switch-to-repl-buffer no longer takes cljs/clj into account. It used to switch to a cljs-repl when in clojurescript-mode and a clj-repl when in clojure-mode. Is this a known bug? Or intended?

magnars10:09:13

Yeah, same thing happens with multiple clojure projects with their own repl. It used to switch to the correct repl for that project, but now only switches to the last used one.

magnars12:09:01

From what I can tell, there is no mention of a relevant repl any more in the cider code. Was this feature just removed, or is there some replacement I'm not finding?

magnars12:09:16

Okay, so C-x C-e and C-c C-k obviously are able to find the correct repl to send the code to - so how do I use that information to visit the correct repl?

dpsutton12:09:54

i've run into the same issues as you. i haven't opened an issue or tried to fix it due to time issues

magnars12:09:39

I have several clojure projects running at once, and some of them with clojurescript repls running as well - so this is really hampering my style.

dpsutton12:09:42

yeah. i think its more based now on a concept of last repl

dpsutton12:09:51

so i'll put my cursor in the one i want and then try to eval

dpsutton12:09:16

this seems like a fine strategy as a last resort but it seems to be too high up the chain on the repl resolution path for me

magnars12:09:43

guess I'll just have to find an old version of cider and stick with that one for a while

dpsutton12:09:30

14 should work

magnars13:09:51

yes, I just installed 14. It works like it should. 🙂 Now I have to find the correct version of clj-refactor to go with it.

magnars13:09:45

I really hope that this is just a regression, and that the relevant switching is coming back.

magnars13:09:26

The docs still say > To switch to the relevant REPL buffer based on the Clojure namespace in the current Clojure buffer, use: C-c C-z.

dpsutton13:09:16

yeah. it was the mechanism that determined this that was changed

magnars13:09:36

This should only pick default to the most recent in ambiguous cases, tho, and still pick correctly from clj vs cljs repls for instance.

dpsutton13:09:50

i totally agree

magnars13:09:52

Maybe it's some bug in that code causing the bug.

dpsutton13:09:00

it seems to get the most recent far too often

dpsutton13:09:20

it also is not good at even recognizing that i'm coming from a cljs buffer and will try to load it in the clj repl

jumar14:09:30

I've also noticed this issue. For now, I'm using (way too often) cider-assoc-buffer-with-connection. However, for some reason, even this function sometimes fail to recognize any active cider connection (although I have e.g. 3 cider repls running)

dpsutton14:09:11

does someone have the time to raise an issue on github?

oskarkv20:09:34

I am using two Emacs frames (on two different monitors), and when cider-doc opens up a new buffer, it appears in the same position as last time, but that might be in the other frame (the one I'm not currently in) and it annoys me. Does anyone know how I can force the buffer to appear in the current frame?

oskarkv20:09:50

I guess deleting the old buffer first works.