M-x (cider-jack-in)
cider-jack-in: Symbol's function definition is void: clojure-project-dir
lein run
"Hello World!"
cat ~/.lein/profiles.clj
{:user {:plugins [[cider/cider-nrepl "0.14.0"]]}}
clojure-mode is installed. I forked and used Brave Clojure's .emacs.d as the starting point. I am not familiar enough with emacs to know what makes his .emacs.d configuration different. I went through his install and upgrade procedures which I quote from the link above:
WARNING
This project uses an outdated version of CIDER, the package that provides much of the functionality for Clojure development. If you run into issues, try upgrading (instructions below).
Why not just update this package to use the latest CIDER, you ask? This project uses CIDER 0.8.1 so that Clojure for the Brave and True readers are less likely to get confused as they use Emacs for the first time.
Installing
- Close Emacs.
- Delete
~/.emacs
or~/.emacs.d
if they exist. (Windows users, your emacs files will probably live inC:\Users\your_user_name\AppData\Roaming\
. So, for example, you would deleteC:\Users\jason\AppData\Roaming\.emacs.d
.) This is where Emacs looks for configuration files, and deleting these files and directories will ensure that you start with a clean slate. - Download the Emacs
configuration zip file
and unzip it. Its contents should be a folder,
emacs-for-clojure-book1
. Runmv path/to/emacs-for-clojure-book1 ~/.emacs.d
. Create the file
~/.lein/profiles.clj
(Windows users, this is probablyC:\Users\your_user_name\.lein\profiles.clj
) and add this line to it:{:user {:plugins [[cider/cider-nrepl "0.8.1"]]}}
Then open Emacs.
Upgrading
Before upgrading, ensure that your .emacs.d
directory is under
version control so that you can always revert to a known good state.
To upgrade:
Edit
.emacs.d/init.el
, adding these lines after line 12:(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t (add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
Close Emacs.
- Run
rm -Rf .emacs.d/elpa/cider-*
- Open Emacs. You'll probably see some errors and your theme won't load. That's ok.
- In Emacs, run
M-x package-refresh contents
. - In Emacs, run
M-x package-install cider
. - Close and re-open Emacs.
- Open
.lein/profiles.clj
and remove[cider/cider-nrepl "0.8.1"]
from it.
That should install the latest version. Enjoy!