This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (59)
- # calva (20)
- # cider (25)
- # clj-kondo (12)
- # cljdoc (3)
- # cljsrn (15)
- # clojure (104)
- # clojure-europe (4)
- # clojure-italy (10)
- # clojure-nl (3)
- # clojure-spec (14)
- # clojure-uk (13)
- # clojurescript (33)
- # code-reviews (26)
- # core-async (1)
- # cursive (5)
- # data-science (3)
- # datomic (8)
- # emacs (3)
- # fulcro (5)
- # graphql (3)
- # hoplon (1)
- # jobs-discuss (4)
- # kaocha (14)
- # nyc (1)
- # off-topic (33)
- # pathom (4)
- # pedestal (2)
- # quil (1)
- # re-frame (5)
- # reagent (10)
- # reitit (6)
- # rewrite-clj (3)
- # shadow-cljs (173)
- # specter (7)
- # sql (4)
- # vim (58)
- # yada (3)
Hello everyone; sorry to just barge in and ask a question.
I recently did a fresh upgrade to emacs 25.2, fresh installs of everything, including the latest and greatest cider. My previous workflow was like this: I'd open the clojure
project.clj file, run emacs M-x
-jac and all the files in the project would get access to the cider repl. IE Ctrl-c Ctrl-z would jump to repl ecc. The buffers would all be "linked" to the repl I cerated with
After the fresh install, some of the files in my project are not attached to the repl anymore. (Ctrl-c Ctrl-z does NOT work for all of the files). I can't quite understand what the pattern is either. Some files attach automatically and some don't and I can't tell the difference.
I also don't know how to link the current buffer I'm visiting to the already-connected REPL. I've read the docs about sesman, and maybe I'm just to dumb, but I don't understand how to achieve the link. I've tried things like
M-x sesman-browser in one of the buffers within the same project/file structure, but the error I get is
No sesman-system in buffer .... I get the same error when I'm in the buffer and try to run
sesman-link-with-buffer. I have no idea what's going on or how to fix it.
I can create a new REPL with a sibling-repl, but this is annoying.
What do do?
@pieterbreed Nothing has been changed with respect to session handling for quite a while now. Which version of CIDER where you using before you upgraded your Emacs?
I can't remember, it's been a while since I updated before that. Once it was stable and I got reasonable used to it, I didn't update until I was forced to recently with a whole bunch of system updates.
I suspect I'm doing something wrong, but I can't figure out what. My assumption is if I run
-jac while in the
project.clj buffer, all the files in the project structure should automatically attach to the new repl.
At the moment I'm in a situation where I have to create a sibling-repl for every buffer that I open
OK, I believe you 🙂 Since that's is not what's happening (for me...) what would you suggest I do for tracking down the issue?
I seem to recall that were relying on the classpath to determine what’s in a project, so I’d start by checking your project’s classpath seems correct. (especially the one produced by the jack-in command)
Let me just check if I'm understanding you fully; if the files I'm struggling with make their way into the classpath, then I should expect the cider session to work out?
More context; I don't have anything funny going on here. These files I refer to are directly in a clj project (ie they're not from libraries or symlinks or cljs or something else I think is funny). They're just normal files, with the
src/ns/ns.clj filepath structure...
I'll double check the classpath after jack-in, but I'm not expecting to find a problem there, since it's such a vanilla project.
Well, I just test everything on a vanilla project and it works fine for me. That’s why I thought you might have some non-standard setup or something like that.
Seems like next logical step would be for @pieterbreed to test it on that same vanilla project. 😃
Here's what I did:
./projec.clj, then ran M-x
cider-jack-in, wait for repl to open and verify that it's live
(+ 2 3) => 5
- Verified that
Ctrl-c Ctrl-z takes me to the active repl and back to
project.clj. That buffer's status bar shows the connected cider session.
./src/orchard/core.clj, noticed that the new buffer don't have the same cider mode status.
Ctrl-c Ctrl-z does NOT take me to the REPL, which is in the buffer "next-door"
When I do that, also the
core.clj buffer works. As in that I can jump back and forth between the repl and the file buffer. I installed Emacs and CIDER pretty recently. Maybe two weeks ago.
I am a total Emacs noob, so if you want me to check something up, I might need pretty detailed instructions. 😃
Well, generally adding more complexity when trying to find the core of a problem sounds risky. 😄
OMG - - Literally right after I posted that it got sorted. My imported
aggressive-indent-mode but it wasn't installed yet. Just now installed that, and cider works like it should. Sorry for wasting everyone's time.
init.el made my recent Emacs (Spacemacs) install totally horrible. I first fought the Tao and tried hard to keep at least parts of my precious init code. Then I nuked it and things started to work. It's a lesson I keep needing, I'm embarrassed to admit.
My init.el is quite simple and auto-installs everything needed. But then again - this days I don’t much development outside OSS and I don’t need much of the crazy things I’ve needed in the good old days. 🙂