Setup of Emacs 24.x+ clojure + lein2.x + slime simple programming environment in Mac OS X

Source: Internet
Author: User

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)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.