cider

onbreath 2025-11-20T11:22:37.010079Z

Happy for any advice on this, I'd also help in making it work, I'm just pretty helpless in emacs lisp beyond absolute basics right now.

onbreath 2025-11-22T12:33:34.588249Z

So apparently the custom variable cider-merge-sessions , customization Cider Merge Sessions is what causes eval to both REPLs. I set it during work on my Emacs LISP code and then didn't unset it.. 🤦 Now with that variable unset it evals to the last active REPL again and my function still works by binding that variable dynamically.

rolt 2025-11-21T08:56:29.021449Z

I had a similar issue in the past with 2 clojure repls and I manage to make it work with a sesman-link-with-buffer call. But I only had 1 file where I wanted to use a different repl

rolt 2025-11-21T08:57:27.800229Z

https://docs.cider.mx/cider/usage/managing_connections.html#displaying-session-info maybe have a look at those 2 to see how things are configured

onbreath 2025-11-21T09:40:35.993089Z

Yes, thank you, I saw that yesterday. I'm glad it seems to work like I described above, the last active repl gets sent the evaluated forms.

onbreath 2025-11-21T12:07:40.828209Z

Well, of course after I said that, I now see evaluation in both repls too.

rolt 2025-11-21T13:10:30.074189Z

what about using sesman-unlink on your babashka link, and then just adding the babashka notebook with sesman-link-with-buffer/directory ?

onbreath 2025-11-21T13:23:23.361699Z

It might work but I think this is a bug and a workaround should not be necessary for everyone wanting to write a babashka notebook. Appreciate your concrete suggestion for the meantime though! I'm not working on it rn, so can't test, but IIRC only thing that changed in between picking last viewed repl and using both for eval might be nrepl version. If that's correct 1.31 works, 1.51 doesn't.

onbreath 2025-11-21T21:48:20.148469Z

Ok, that's not it. Now I don't know why it started to eval to both repls..

onbreath 2025-11-21T21:50:15.882029Z

And of course, it could also not be a bug, if the intent is to always eval on all clojure repls at once. But then it's even more a question whether a babashka repl should just be an additional clojure repl.

onbreath 2025-11-21T22:23:59.668059Z

@rolthiolliere Now your workaround (unlinking babashka from overall project) at least improves the situation. Thanks again. Just in my case I can't unlink the (real) clojure repl from the babashka directory.

onbreath 2025-11-20T23:58:42.710969Z

I understand it a bit better now. I'll further test things. But for now it looks like having the right repl in the foreground works. There's some rough edges around it, like it tries to send clj files to the babashka repl that are not on babashkas classpath (bb.edn). The classpath issue might not always be addressable, but maybe when a bb.edn with :paths exists? Having the ability to evaluate a .clj file selectively as Clojure or babashka is convenient and due to babashka supporting it even necessary.