|
3 | 3 | If you're new to emacs, check out
|
4 | 4 | [this introductory tutorial](http://www.braveclojure.com/basic-emacs/)!
|
5 | 5 |
|
| 6 | +## WARNING |
| 7 | + |
| 8 | +This project uses an outdated version of |
| 9 | +[CIDER](https://github.com/clojure-emacs/cider), the package that |
| 10 | +provides much of the functionality for Clojure development. If you run |
| 11 | +into issues, try upgrading (instructions below). |
| 12 | + |
| 13 | +Why not just update this package to use the latest CIDER, you ask? |
| 14 | +This project uses CIDER 0.8.1 so that |
| 15 | +[Clojure for the Brave and True](http://www.braveclojure.com/basic-emacs/) |
| 16 | +readers are less likely to get confused as they use Emacs for the |
| 17 | +first time. |
| 18 | + |
| 19 | +## Installing |
| 20 | + |
| 21 | +1. Close Emacs. |
| 22 | +2. Delete `~/.emacs` or `~/.emacs.d` if they exist. (Windows users, your |
| 23 | + emacs files will probably live in |
| 24 | + `C:\Users\your_user_name\AppData\Roaming\`. So, for example, you |
| 25 | + would delete `C:\Users\jason\AppData\Roaming\.emacs.d`.) This is |
| 26 | + where Emacs looks for configuration files, and deleting these files |
| 27 | + and directories will ensure that you start with a clean slate. |
| 28 | +3. Download the Emacs |
| 29 | + [configuration zip file](https://github.com/flyingmachine/emacs-for-clojure/archive/book1.zip) |
| 30 | + and unzip it. Its contents should be a folder, |
| 31 | + `emacs-for-clojure-book1`. Run `mv path/to/emacs-for-clojure-book1 |
| 32 | + ~/.emacs.d`. |
| 33 | +4. Create the file `~/.lein/profiles.clj` (Windows users, this is |
| 34 | + probably `C:\Users\your_user_name\.lein\profiles.clj`) and add this |
| 35 | + line to it: |
| 36 | + |
| 37 | +```clojure |
| 38 | +{:user {:plugins [[cider/cider-nrepl "0.8.1"]]}} |
| 39 | +``` |
| 40 | + |
| 41 | +Then open Emacs. |
| 42 | + |
| 43 | +## Upgrading |
| 44 | + |
| 45 | +Before upgrading, ensure that your `.emacs.d` directory is under |
| 46 | +version control so that you can always revert to a known good state. |
| 47 | + |
| 48 | +To upgrade: |
| 49 | + |
| 50 | +1. Edit `.emacs.d/init.el`, adding these lines after line 12: |
| 51 | + |
| 52 | + ```elisp |
| 53 | + (add-to-list 'package-archives |
| 54 | + '("melpa-stable" . "http://stable.melpa.org/packages/") t) |
| 55 | + |
| 56 | + (add-to-list 'package-pinned-packages '(cider . "melpa-stable") t) |
| 57 | + ``` |
| 58 | + |
| 59 | +2. Close Emacs. |
| 60 | +3. Run `rm -Rf .emacs.d/elpa/cider-*` |
| 61 | +4. Open Emacs. You'll probably see some errors and your theme won't |
| 62 | + load. That's ok. |
| 63 | +5. In Emacs, run `M-x package-refresh contents`. |
| 64 | +6. In Emacs, run `M-x package-install cider`. |
| 65 | +7. Close and re-open Emacs. |
| 66 | + |
| 67 | +That should install the latest version. Enjoy! |
| 68 | + |
6 | 69 | ## Organization
|
7 | 70 |
|
8 | 71 | I've tried to separate everything logically and document the purpose
|
|
0 commit comments