Clojure 1.2 released! How to get swank-clojure to use this?

I just installed a new installation of emacs, installed ELPA and installed swank-clojure using ELPA. Although Clojure 1.2 is released when I click "Mx slime", it still loads Clojure 1.1 for me instead of 1.2

How do I get it to use 1.2 now that it is available? Do I need to do this manually? Should I wait for a slime / swank update to use 1.2?

Refresh . Thanks for the recommendations on using leiningen, but what I need is to make emacs just run REPL. Is this a problem because the swank-clojure package in ELPA is not updated?

+3
source share
4 answers

Leiningen 1.3 makes it easy to create a standalone session:

$ lein install swank-clojure 1.3.0-SNAPSHOT
$ ~/.lein/bin/swank-clojure

You can add ~ / .lein / bin to your $ PATH to make this easier.

Then inside Emacs:

M-x slime-connect

Running swank from within Emacs can be done using Mx lein-swank if you are in the project directory. However, the automatic download and installation of Clojure and other dependencies using swankclojure.el is error-prone and outdated.

+5
source

, , , M-x slime ~/.clojure ~/.swank-clojure . , swank-clojure-classpath ( ~/.clojure), , REPL.

, . :

1: Swank,

- Leiningen. project.clj:

(defproject repl-base "1.0.0-SNAPSHOT"
  :description "A project to start Swank in."
  :dependencies [[org.clojure/clojure "1.2.0"]
                 [org.clojure/clojure-contrib "1.2.0"]]
  :dev-dependencies [[swank-clojure "1.2.1"]])

lein swank , swank-, M-x slime-connect Emacs.

cljr, -, Swank; README.

2: Swank Emacs

, , , , Swank Emacs - , (, , ), . . , Clojure - Swank Leiningen.

+3

leiningen emacs slime clojure. , leiningen .

clojure , .

(defproject myprojecy "0.1.0-SNAPSHOT"
   :description "A project."
   :dependencies [[org.clojure/clojure "1.2.0-beta1"]
                 [org.clojure/clojure-contrib "1.2.0-beta1"]]
   :dev-dependencies [[swank-clojure "1.2.1"]])

, - . Leiningen "", .

lein swank swank:

ptimac:cljhack pti$ lein swank
user=> Connection opened on local port  4005
#<ServerSocket ServerSocket[addr=localhost/127.0.0.1,port=0,localport=4005]>

emacs M-x slime-connect .

+1

swank- clojure -classpath , M-x slime

, clojure.jar, clojure -contrib.jar swank- clojure.jar c:\jars

-

(setq swank-clojure-classpath '("c:/jars/clojure.jar" "c:/jars/cloure-contrib.jar" 
"c:/jars/swank-clojure.jar"))

C-x C-e M-x, .

https://github.com/jochu/swank-clojure/blob/master/swank-clojure.el#L32-34

http://en.wikibooks.org/wiki/Clojure_Programming/FAQ#Where_does_swank-clojure_.28SLIME.29_look_for_Clojure.27s_jars.3F

0
source

Source: https://habr.com/ru/post/1760836/


All Articles