1. Install clojure-mode via git or marmalade-repo.org
2. lein plugin install swank-clojure 1.3.1
3. Invoke M-x clojure-jack-in from a project
More details along with a short screencast are on my blog:
http://technomancy.us/149 60 seconds from zero config to running
SLIME!
-Phil
Hi Phil,
> I pushed out some changes last night that make it much, much easier to
> get set up with Emacs and SLIME. If you've tried it and ended up
> bewildered by issues with ELPA or how to launch a swank server, give
> it another go! It only takes three steps to get started:
>
> 1. Install clojure-mode via git or marmalade-repo.org
> 2. lein plugin install swank-clojure 1.3.1
> 3. Invoke M-x clojure-jack-in from a project
I tried it by first deinstalling any clojure/swank/SLIME packages I
had. Then I installed clojure-mode 1.9.0 from the marmalade-repo.
In a terminal, I did
$ lein upgrade # ==> 0.6.3
$ lein plugin install swank-clojure 1.4.0-SNAPSHOT
Then I opened some clojure file in an existing project and did
M-x clojure-jack-in RET
I got a new popup *swank* buffer, but in there, I get an exception.
--8<---------------cut here---------------start------------->8---
;;; Bootstrapping bundled version of SLIME; please wait...
;;; slime.el --- Superior Lisp Interaction Mode for Emacs
;;
;;;; License
;; Copyright (C) 2003 Eric Marsden, Luke Gorrie, Helmut Eller
;; Copyright (C) 2004,2005,2006 Luke Gorrie, Helmut Eller
;; Copyright (C) 2007,2008,2009 Helmut Eller, Tobias C. Rittweiler
[...]
(provide 'slime-repl)
;;; slime-repl.el ends here
(run-hooks 'slime-load-hook)
Warning: *classpath* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *classpath* or change the name.
Reflection warning, swank/util/io.clj:15 - call to java.lang.String ctor can't be resolved.
[... snipped more reflection warnings ...]
Reflection warning, swank/swank.clj:76 - call to java.lang.Integer ctor can't be resolved.
Exception in thread "main" java.lang.IllegalArgumentException: No value supplied for key: 55298
at clojure.lang.PersistentHashMap.createWithCheck(PersistentHashMap.java:89)
at clojure.core$hash_map.doInvoke(core.clj:355)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:600)
at swank.swank$start_server.doInvoke(swank.clj:56)
at clojure.lang.RestFn.invoke(RestFn.java:516)
at user$eval1615.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6378)
at clojure.lang.Compiler.eval(Compiler.java:6368)
at clojure.lang.Compiler.eval(Compiler.java:6369)
at clojure.lang.Compiler.eval(Compiler.java:6345)
at clojure.core$eval.invoke(core.clj:2745)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
--8<---------------cut here---------------end--------------->8---
I have to say that this project uses a clojure 1.3.0 snapshot. Is that
supposed to work? And if not, is there some workaround?
Bye,
Tassilo
Hi Phil,
>> $ lein upgrade # ==> 0.6.3
>> $ lein plugin install swank-clojure 1.4.0-SNAPSHOT
>
> There is no Leiningen version 0.6.3--I'm assuming you're running
> 1.5.2?
Ups, you are correct. ;-)
>> Reflection warning, swank/util/io.clj:15 - call to java.lang.String
>> ctor can't be resolved.
>
> It looks like there are still problems with suppressing output from
> the subprocess. I'll see if I can get that fixed soon.
>
>> I have to say that this project uses a clojure 1.3.0 snapshot. Is that
>> supposed to work? And if not, is there some workaround?
>
> If you upgrade to leiningen from git it will remove the *classpath*
> warning, but if you have other output like reflection warnings it's
> not going to work right now unless you can get rid of it all; sorry.
> Hopefully I'll have a fix soon.
Do I get you right that the output is the problem that prevents me to
get to the SLIME REPL, since you didn't say anything at all about that
IllegalArgumentException?
Bye,
Tassilo
Where does one get clojure-mode 1.9.1? The latest I see on github is
1.7.1.
On May 20, 4:06 pm, Phil Hagelberg <p....@hagelb.org> wrote:
Hi Phil,
>> Do I get you right that the output is the problem that prevents me to
>> get to the SLIME REPL, since you didn't say anything at all about
>> that IllegalArgumentException?
>
> I'm not sure what's going on with the IllegalArgumentException. Do you
> have more than one version of swank in ~/.lein/plugins?
No, but there were three versions of leiningen in ~/.lein/self-installs/
if that matters.
> If so it's due to a separate bug in Leiningen. But I've fixed the
> output bug in clojure-mode 1.9.1; see if that helps.
No, still I get
--8<---------------cut here---------------start------------->8---
Exception in thread "main" java.lang.IllegalArgumentException: No value supplied for key: 52572
at clojure.lang.PersistentHashMap.createWithCheck(PersistentHashMap.java:89)
at clojure.core$hash_map.doInvoke(core.clj:355)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:600)
at swank.swank$start_server.doInvoke(swank.clj:56)
at clojure.lang.RestFn.invoke(RestFn.java:516)
at user$eval1615.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6378)
at clojure.lang.Compiler.eval(Compiler.java:6368)
at clojure.lang.Compiler.eval(Compiler.java:6369)
at clojure.lang.Compiler.eval(Compiler.java:6345)
at clojure.core$eval.invoke(core.clj:2745)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
--8<---------------cut here---------------end--------------->8---
But with a new project created with "lein new myproject" it works fine.
Even after changing that new project's deps to clojure 1.3.0-SNAPSHOT.
Hm, I wonder what's making the existing project not "jack-innable"...
Bye,
Tassilo
Hi Phil,
>> But with a new project created with "lein new myproject" it works
>> fine. Even after changing that new project's deps to clojure
>> 1.3.0-SNAPSHOT.
>>
>> Hm, I wonder what's making the existing project not "jack-innable"...
>
> I think this may be due to a conflict between swank in ~/.lein/plugins
> and swank in lib/dev.
Oh, indeed. The project had 1.3.0 while in ~/.lein/plugins/ it was a
1.4.0 snapshot. I changed my project.clj to require 1.4.0-SNAPSHOT, did
run "lein deps force", and now it works. Thank you!
Bye,
Tassilo
I am curious: Why don't you use the excellent vimclojure plugin for vim?
If you decide to do so, I would also recommend the paredit implementation in
the slimv plugin.
--
.''`. Wolodja Wentland <bab...@gmail.com>
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
On Thu, May 26, 2011 at 20:37 -0700, J.R. Garcia wrote:I am curious: Why don't you use the excellent vimclojure plugin for vim?
> I compiled a new version of emacs from source and started it up.
> clojure-jack-in just worked flawlessly. This is stupid simple! Thanks
> for your hard work! It's much appreciated for emacs newcomers like me
> (I'm a vim user)!
If you decide to do so, I would also recommend the paredit implementation in
the slimv plugin.
The website said to install clojure-mode via marmalade, but it's not
at all clear to me what marmalade actually does (the website for
marmalade gives brief instructions about how to install marmalade, but
nothing about how to use it to install something else).
Thanks in advance,
Mark
Heh, yeah that marmelade was a funny one, I spent a few hours figuring what goes where.....
I suggest you download emacs-starter-kit from Phil's github repo, that has the necessary configuration for marmelade too.
Then proceed with installing clojure-mode.
Las
sent from my mobile device
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
I did all that once (downloading Phil's emacs-starter-kit) a long time
ago. I just can't seem to get it all to download the newest version
of clojure-mode. For example, when I do package-list-packages it
still shows 1.7.1. Any pointers?
Thanks,
Mark
Mark
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
I reinstalled emacs-starter-kit, then reinstalled clojure-mode. I
downloaded the latest version of lein, and created a completely fresh
new project. Then, I did lein plugin install swank-clojure 1.3.1.
I opened up the core.clj from the newly created project in emacs and
did clojure-jack-in.
I get the error: The system cannot find the path specified.
Thanks,
Mark
Thanks for all the help you all have provided so far; let me know if
you have any other ideas for me to try.
Thanks,
Mark
2011/5/30 J.R. Garcia <mrjohn...@gmail.com>:
Thanks,
Mark
Is there another/better source?
Emacs v23 didn't work for me in either Windows XP or Windows 7.
So, I searched and found Emacs 24 at:
http://code.google.com/p/emacs-for-windows/updates/list
clojure-jack-in with Emacs 24 worked seamlessly with Windows 7 (64 bit).
With Windows XP, clojure-jack-in fails with the following error:
"cd c:/projects/pasclj && lein jack-in 11991: exited abnormally with code 1."
So, on XP I start "lein swank" manually in another window and use slime-connect.
Shoeb
With clojure-mode 1.9.2 and (GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-30 on SOFT-MJASON) (according to emacs-version), I had to
change a s-exp on line 848 in clojure-mode.el from
(expand-file-name clojure-root)
to
(replace-regexp-in-string "/" "\\\\" (expand-file-name clojure-root) t)
and that resolved the "cannot find the path specified" error for me.
Many thanks to Phil & all for their work on this!
Hope that helps,
Jeff
>
> Thanks,
>
> Mark
>
> On Mon, May 30, 2011 at 3:10 PM, Mark Engelberg
> <mark.en...@gmail.com> wrote:
>> The package installer saw the 1.9.2 release, which I installed. I'm
>> still getting the "cannot find the path specified" error though.
>>
>> Thanks for all the help you all have provided so far; let me know if
>> you have any other ideas for me to try.
>>
>> Thanks,
>>
>> Mark
>>
>
I still get the error.
On Thu, Jun 9, 2011 at 2:17 AM, Andreas Liljeqvist <bon...@gmail.com> wrote:
> Is there anything more to your error message than "cannot find the path
> specified"?
At the bottom, it says:
cd c:/Devel/Clojure/lein/testalpha7/ && lein jack-in 1187: exited
abnormally with code 1.
Thanks for all the help. I'm looking forward to getting this working.
This worked for me! I recommend this magical change be rolled into
any future version of clojure-mode.
Thanks!
Seems to work for me.
I get the error "Not enough arguments for format string".
Just curious: why defvar over plain def there? (I'm thinking in the
context of defvar being in the old deprecated contrib libraries and
not being in the new maintained contrib libraries)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
This works for me! Thanks!
Jeff
I got this same error when I copied and pasted the clojure-jack-in
function from gmail. I had to remove newlines from
(search-backward "slime-load-hook")
and
(slime-connect "localhost" clojure-swank-port)
Hope that helps,
Jeff
i have a (possibly daft) question -- is there a neat way to
kill/restart the underlying process. i have looked for a *ahem*
clojure-jack-off function or equivalent but couldnt find one in the
source. i am just killing it from the terminal at the moment and
re-running clojure-jack-in... is there a better way? slime-disconnect
seems to leave the underlying process still running in list-processes.
thanks again!
gaz
> This should do the trick, though I'm not set up with jack-in to test:
>
> At the REPL, type comma (the character ,), then sayoonara.
You can also just kill the *swank* buffer.
-Phil