1. Install emacs-24.x version, http://emacsformacosx.com/
2. Edit ~ The init. El file in the/. emacs. D folder and install the plug-in. (I tried to minimize the installation of clojure-mode and nrepl for editing and simplicity)
Configuration:
(require 'package)(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))(package-initialize)
Or
(require 'package)(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)(package-initialize)
The address of the software warehouse. I cannot connect to the first warehouse, but the second is not bad.
Then execute the command
M-x package-refresh-Contents
Install clojure-mode.
M-x package-install [RET] clojure-mode [RET]
Install nrepl
M-x package-install [RET] nrepl [RET]
Install slime-Mode .) (This should be related to my use of Emacs 24, which is already supported by default)
M-x package-install [RET] Slime-mode [RET]
3. Install leinigen 2.x.
4. Run lein new testclj in your own clojure workspace;
5. start Emacs, wait until package install is complete, and load the core under testclj. CLJ file, write your own function, M-x nrepl-jack-in (c-x m-j); convert the cursor core. the final C-x C-E of the custom function in the CLJ buffer sends the compiled function to nrepl, and then you can test the function just compiled in nrepl.
Content of my init. RL file:
(require 'package)(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)(package-initialize)(when (not package-archive-contents) (package-refresh-contents))(when (not (package-installed-p 'nrepl)) (package-install 'nrepl))
Reference URL:
Https://github.com/technomancy/clojure-mode
Https://github.com/technomancy/swank-clojure
Https://github.com/kingtim/nrepl.el
Https://github.com/technomancy/leiningen
Some people like to install emacs-starter-Kit. I'm not used to it, so I don't have to install Emacs first.
For more complete debugging environment, see Ritz (https://github.com/pallet/ritz)