Problems getting Emacs 24 to run SLIME and the Clojure Debug Toolkit (CDT)

I am trying to get Slime to work with CDT and emacs 24, to no avail, and I will be grateful for the suggestions.

1) I got clojure-jack-in to run, but only when I downloaded swank-clojure 1.3.3 as a lein plugin, as described on the github swank-clojure page, https://github.com/technomancy/swank-clojure .

2) I tried to get swank-clojure 1.4.0-SNAPSHOT loaded as described by George Jahad at http://georgejahad.com/clojure/swank-cdt.html (using Clojure 1.2.1), but I could not execute clojure -jack-in to run. I got the same error as described in 3) below.

3) More recently, I tried to duplicate the results of a short video with a proof of concept on the technomancy.us website, in which there is a “radical simplification”, http://technomancy.us/149 . In this method, I downloaded swank-clojure 1.4.0-SNAPSHOT as the lein plugin and confirmed that it was loaded before ~/.lein/plugins/swank-clojure-1.4.0-SNAPSHOT.jar . When I created a new lein project, made lein deps on it, opened the core.clj file of the project in emacs, and then executed Mx clojure-jack-in , instead of getting REPL, I got the following error in the emacs minibuffer:

 error in process filter: Search failed: "(run-hooks 'slime-load-hook) ; on port" 

Note that the end of the error line does not include the port number. If this does not truncate the longer error line, the lack of a port number makes me difficult.

The *swank* buffer is long, starting from:

 ;;; Bootstrapping bundled version of SLIME; please wait... 

and ending with:

 (provide 'slime-repl) ;;; slime-repl.el ends here (run-hooks 'slime-load-hook) ;;; proceed to jack in 

which is consistent with the error message.

I spent about six hours on this, including many searches on the Internet, and no luck. Thanks for any help you can provide.


ADD: I continued to experiment, and now the *swank* buffer ends as before (dies in one place), but with extra lines at the end. FYI, here it is:

 (provide 'slime-repl) ;;; slime-repl.el ends here (run-hooks 'slime-load-hook) [WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom [WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom [WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository clojars at http://clojars.org/repo/ Unable to locate resource in repository [INFO] Unable to find resource 'org.clojure:clojure:pom:1.+' in repository clojars (http://clojars.org/repo/) Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository stuartsierra-releases at http://stuartsierra.com/maven2 Unable to locate resource in repository [INFO] Unable to find resource 'org.clojure:clojure:pom:1.+' in repository stuartsierra-releases (http://stuartsierra.com/maven2) Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository clojure at http://build.clojure.org/releases Unable to locate resource in repository [INFO] Unable to find resource 'org.clojure:clojure:pom:1.+' in repository clojure (http://build.clojure.org/releases) Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository clojure-snapshots at http://build.clojure.org/snapshots Unable to locate resource in repository [INFO] Unable to find resource 'org.clojure:clojure:pom:1.+' in repository clojure-snapshots (http://build.clojure.org/snapshots) Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository central at http://repo1.maven.org/maven2 Unable to locate resource in repository [INFO] Unable to find resource 'org.clojure:clojure:pom:1.+' in repository central (http://repo1.maven.org/maven2) Copying 9 files to /Users/gw/tech/clojurestuff/cljprojects/infwb/lib Copying 1 file to /Users/gw/tech/clojurestuff/cljprojects/infwb/lib/dev Listening for transport dt_socket at address: 61012 ;;; proceed to jack in 

(end of addition)


APPENDIX 2 (December 12, 2011) Thanks to everyone who offered help, especially @ivant, to whom I award a tick. I am going to consider this situation closed, because I gave up trying to fix it. This was difficult thanks to the use of a pre-packaged initialization package, which, I am sure, is quite pleasant, but I could not understand what it was doing, and whether it helped this problem.

I restarted the “clean” Emacs 24 and returned to swank-clojure 1.3.3, and clojure-jack-in now works fine. I will try the CDT later as soon as the error registered in swank-clojure 1.4.0-SNAPSHOT is resolved.

I learned some of the comments from people - thanks again.

+4
source share
3 answers

Upgrading to swank-clojure 1.4.0 (released yesterday) and everything will just work out of the box. lein plugin install swank-clojure 1.4.0

CDT installation and integration is now fully automated. Be sure to delete the old copies of swank-clojure, slime.el and slime-repl.el that you were lying on. To be safe, make sure you have the latest clojure -mode.el installed.

0
source

NB I have neither emacs 24 nor CDT.

Looking at the clojure-jack-in code, it looks like it pre-selects a port and starts clojure with lein jack-in <port> (unless you redefined clojure-swank-command somewhere).

Then it analyzes the output (which is visible in the *swank* buffer), looking for specific lines to trigger some actions. It:

  ;;; Bootstrapping bundled version of SLIME ... ;;; Done bootstrapping. 

or as a reserve:

  ;;; Bootstrapping bundled version of SLIME ... (run-hooks 'slime-load-hook) ; on port 

and it executes emacs commands between these lines. The line "jump to socket" starts the actual connection.

So, check the source, check the values ​​of some relevant variables (for example, clojure-swank-command ) and check that *swank* in the buffer for hints.

EDIT

You might want to run lein deps in your project by trying Mx clojure-jack-in , otherwise print, for example,

 Downloading: org/clojure/clojure/1.+/clojure-1.+.pom from repository clojars at http://clojars.org/repo/ ... 

may end in the *swank* buffer and may prevent the process from starting.

But this particular addiction seems rather suspicious to me. Can you host your project.clj file?

+2
source

I do not have an answer, although I encountered the same problem, but I can provide work.

Just run lein swank from the command line and use slime-connect inside Emacs and you will have at least a working environment.

This was also posted to the swank-clojure error list: https://github.com/technomancy/swank-clojure/issues/87

0
source

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


All Articles