Fork me on GitHub
#cider
<
2018-09-27
>
mkvlr13:09:51

hey 👋 I’m wondering if there’s an obvious reason I’m missing for prompts like https://github.com/clojure-emacs/cider/issues/2444#issuecomment-423757742 to exist? I feel it would be much nicer if cider just reconnected without a prompt.

mkvlr13:09:37

we have our app setup so it automatically connects cider on boot. So when I kill the app via ctrl+c and restart it I get the prompt. Is there any way to recover state from a dead repl or what’s the reasoning behind that prompt? When would I not want to say yes to this?

mkvlr14:09:12

oh, and thanks a lot for all your work on cider! 🙏🙏🙏

bozhidar14:09:22

@mkvlr We can’t recover the REPL state, but you get to keep the history in the REPL buffer, which some people find useful.

mkvlr14:09:53

I see, so that’s lost when reconnecting?

bozhidar14:09:58

Obviously we can just add some switch to disregard the REPL buffer similarity and directly reconnect (as it was before this patch).

bozhidar14:09:21

If you kill the nREPL server the state disappears with it. If you just re-connect the state will stay around.

bozhidar14:09:41

> oh, and thanks a lot for all your work on cider! 🙏🙏🙏

bozhidar14:09:49

You’re welcome! :man-bowing:

mkvlr14:09:31

before this patch it connected a second repl, right?

bozhidar14:09:58

Btw, is your problem with the fact we try to reuse the dead REPL buffer or with the fact that we display a prompt?

mkvlr14:09:01

the prompt

mkvlr14:09:43

I believe there’s also a bug in 0.18 that resulted in everything breaking when connecting a second repl but I think that’s fixed now

mkvlr14:09:24

for me the prompt isn’t very useful and just a interruption

mkvlr14:09:38

I’d always like to reuse the dead REPL buffer

mkvlr14:09:53

(instead of opening a new one and having to close the dead one)

mkvlr14:09:26

would you be open to a PR either introducing a setting or automatically reusing the buffer without a prompt?

mkvlr14:09:37

I think I’d be in favor of the latter

bozhidar14:09:36

Got it. Just keep in mind that match might not be exact, which is the main reason there’s a prompt. If you have just one repl buffer obviously that’s not a real concern, though.

bozhidar14:09:45

Yeah, I’d be fine with introducing a defcustom for this.

bozhidar14:09:05

It should have 3 values - always, never, and prompt (which should be the default).

mkvlr14:09:58

ok, cool, might look at it tomorrow. Have a good day!

madstap16:09:51

Is there a config option to make cider stop trying to jump to an error?

bozhidar16:09:18

Yes, but I don’t remember its name.

justinbarclay16:09:47

Quickly searching through CIDER settings I think it’s cider-auto-jump-to-error

bozhidar16:09:16

Yep, that’s the one.

bozhidar20:09:30

If someone’s interested in auth support for nREPL they can check out https://github.com/nrepl/nREPL/pull/46