3
votes

I have (except for some additions such as company-mode my emacs 24.5 configured as recommended in the chapter of clojure for the brave and true.

Unfortunately I ran into a problem where I tried to work through some alice in wonderland clojure katas and the REPL would not fire up in the correct namespace. I could switch to the namespace with C-c M-n and the REPL showed the namespace, however any evaluation after that gave me an error „namespace does not exist“.

I tried to update cider-nrepl (simply by changing it in ~/.lein/profiles.clj, but then it gave me an error that Cider and Cider-nREPL version numbers were incompatible. I tried to update with a simple package-install cinder which also did not work but gave me this warnings along the lines of the function cider-find-var is not known and functions being called with the wrong number of arguments.

How do I keep the packages up to date? Is my namespace issue even related to this?

1

1 Answers

2
votes

Your namespace issue sounds like a different problem. This happens if you have a namespace in a file, and that file is not loaded automatically when cider starts.

You can switch the repl to that name, though none of the contents will have been loaded until you load the file by pressing Ctrl-cCtrl-k. If you add a require in core.clj (or whatever your project uses as it's start namespace) that requires the namespace in question, than that namespace will get loaded when you start cider.



Update

The world has improved and you no longer need to set anything in ~/.lein/profiles.clj. You should remove all cider and nrepl references from that file and then install the latest version of cider.el and all this stuff will start working. Specifically cider.el now ads the proper dependency to lein when you run cider-jack-in automatically. So if you have the latest version, and start lein through cider then you no longer need to do any special stuff.