简体   繁体   中英

How to update cider in 'brave clojure' bootstrapped emacs

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 Cc Mn 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?

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-c Ctrl-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.


on to your cider nrepl version matching problem. This can happen when a new verion of cider is released and you do something in emacs that updates the packages. then your cider version gets ahead of the nrepl version. I have had the most pleasant experience by always setting the cider-nrepl version in ~/.lein/profiles.clj to the version listed at the top of the screen when you start cider.


: cider nrepl config is no longer required! :不再需要苹果酒nrepl配置!

The world has improved and you no longer need to set anything in ~/.lein/profiles.clj. You should and then install the latest version of cider.el and all this stuff will start working. ,然后安装最新版本的cider.el,所有这些东西都将开始工作。 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM