Re: Having difficulties with compilation in slime, emacs and clojure-project
Zef, Can you compile files? My environment works fine by setting all necessary clojure.jar, clojure-contrib.jar, swank-clojure.jar, ~/clj (my own project directory) in swank-clojure-classpath. However, I have difficulty to generate classes from the *.clj. E.g. I have a find.clj in ~/clj/src/futils/. By running (compile 'futils.find), I got the following error. I think the swank at least already finds the find.clj to compile because it shows the different error below if I try to compile a non-existing file (compile 'futils.fake). Except compiling, I can call functions in futils.find from slime-repl without any issue. Could someone shed me some light on this? p.s. clojure.jar(1.1), clojure-contrib.jar(1.1), swank-clojure.jar (1.0). I pull all of them from github and compiled them. Emacs elpha: clojure-mode(1.6) swank-clojure(1.1.0) slime (2009-10-16) slime-repl(2009-10-16) Thanks, James The file I want to compile :(compile 'futils.find) No such file or directory [Thrown class java.io.IOException] Restarts: 0: [ABORT] Return to SLIME's top level. Backtrace: 0: java.io.UnixFileSystem.createFileExclusively(Native Method) 1: java.io.File.createNewFile(File.java:883) 2: clojure.lang.Compiler.writeClassFile(Compiler.java:5000) 3: clojure.core$gen_class__7189.doInvoke(genclass.clj:594) 4: clojure.lang.RestFn.invoke(RestFn.java:498) 5: clojure.lang.Var.invoke(Var.java:379) 6: clojure.lang.AFn.applyToHelper(AFn.java:197) 7: clojure.lang.Var.applyTo(Var.java:476) 8: clojure.lang.Compiler.macroexpand1(Compiler.java:4504) The file doesn't exist (compile 'futils.fake) Could not locate futils/fake__init.class or futils/fake.clj on classpath: [Thrown class java.io.FileNotFoundException] On Jan 8, 6:19 am, Zef Hemel zefhe...@gmail.com wrote: Thanks, indeed, swank-clojurewas not on my classpath, I added it as a dependency to my project.clj and now it works fine. On Jan 8, 2:25 pm, Shawn Hoover shawn.hoo...@gmail.com wrote: On Fri, Jan 8, 2010 at 4:39 AM, Zef Hemel zefhe...@gmail.com wrote: After I do the swankclojureproject command, enter the directory and press return myEmacsgets stuck doing this:http://imgur.com/Ap8mo When I just go to the Slime CLI that works fine. Any idea what could be wrong there? Zef Check your inferior-lisp buffer. There may be some errors in there indicatingclojure.main or swank.swank is missing. swank-clojure-project won't work unless all dependencies live in appropriate places under the project directory. Here's how I hackedClojureBox startup to not wipe out the entire classpath and build it from scratch:http://bitbucket.org/shoover/clojure-box/src/8015172a1dc3/default.el#... Shawn -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Shawn Hoover shawn.hoo...@gmail.com writes: In updating Clojure Box to the latest I found that the defadvice form has to be loaded before slime is loaded. (I didn't know about ad-activate.) This would be a problem if you somehow require slime before the ELPA's package-initialize is called, which loads the swank-clojure autoloads, which includes the defadvice. Yeah, you should ideally remove all manual configuration of slime, but failing that I guess it would need to be moved till after package.el is initialized. I'll make a note in the readme. -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
After I do the swank clojure project command, enter the directory and press return my Emacs gets stuck doing this: http://imgur.com/Ap8mo When I just go to the Slime CLI that works fine. Any idea what could be wrong there? Zef -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
On Thu, Jan 7, 2010 at 11:37 PM, Joel jboehl...@gmail.com wrote: Hello, I have an emacs setup on OSX using elpa with the latest clojure-mode, swank-clojure, slime, slime-repl all from ELPA. When I upgraded to the latest swank-clojure in ELPA (swank-clojure-1.1.0), I began to get this error as well: Searching for program: no such file or directory, lisp I traced it back a bit, and found that the before advice on slime-read- interactive-args wasn't being called. It apparently wasn't activated. I evaluated the following form: (ad-activate 'slime-read-interactive-args) And now all seems to be working well. I'm not sure why this advice hasn't been activated. On the prior versions of swank-clojure, I didn't have this problem. Loading order issue maybe? Anyhow, try explicitly activating that advice and see if that fixes your problem. Cheers, Joel In updating Clojure Box to the latest I found that the defadvice form has to be loaded before slime is loaded. (I didn't know about ad-activate.) This would be a problem if you somehow require slime before the ELPA's package-initialize is called, which loads the swank-clojure autoloads, which includes the defadvice. Shawn -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
On Fri, Jan 8, 2010 at 4:39 AM, Zef Hemel zefhe...@gmail.com wrote: After I do the swank clojure project command, enter the directory and press return my Emacs gets stuck doing this: http://imgur.com/Ap8mo When I just go to the Slime CLI that works fine. Any idea what could be wrong there? Zef Check your inferior-lisp buffer. There may be some errors in there indicating clojure.main or swank.swank is missing. swank-clojure-project won't work unless all dependencies live in appropriate places under the project directory. Here's how I hacked Clojure Box startup to not wipe out the entire classpath and build it from scratch: http://bitbucket.org/shoover/clojure-box/src/8015172a1dc3/default.el#cl-33 Shawn -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Rob Lachlan napisał(a): Thanks for the help. I had initially installed slime, clojure-mode and swank following the instructions at http://riddell.us/tutorial/slime_swank/slime_swank.html I tried simply installing swank-clojure, but that seemed to conflict with what I already had. So I removed everything -- slime, clojure- mode, etc. and installed swank-clojure using ELPA. This in turn installed slime, slime-repl, swank-clojure, and clojure- mode. But now when I try M-x slime, I get: Searching for program: no such file or directory, lisp Clearly, my emacs-fu is not strong enough. Any ideas? First of all make sure that ELPA package.el is loaded before (require 'slime). It is important for correct initialization of load-path list. Then check the content of load-path (type load-path in *scratch* buffer and press C-j). There should be in this list directories with clojure-mode, slime, slime-repl, swank-clojure installed using ELPA. Check swank-clojure-classpath (there should be clojure.jar, clojure- contrib.jar and swank-clojure.jar on this path) and swank-clojure-java-path (there should be java executable, which can be found on system PATH). HTH, Rob -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Rob Lachlan robertlach...@gmail.com writes: Thanks for the help. I had initially installed slime, clojure-mode and swank following the instructions at http://riddell.us/tutorial/slime_swank/slime_swank.html I tried simply installing swank-clojure, but that seemed to conflict with what I already had. So I removed everything -- slime, clojure- mode, etc. and installed swank-clojure using ELPA. This in turn installed slime, slime-repl, swank-clojure, and clojure- mode. But now when I try M-x slime, I get: Searching for program: no such file or directory, lisp Sounds like you didn't quite remove everything from your old setup. There must still be some old slime code/configuration lying around somewhere. -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Thanks Phil and Rob for your help. I got rid of everything in emacs.d, and tried reinstalling from the beginning. For some reason, elpa seems to get stuck halfway through with this message: trying to parse HTTP response code in odd buffer: *http tromey.com:80* But having installed swank-clojure, I get an error: java.lang.ClassNotFoundException: swank.swank And I can't find swank-clojure.jar anywhere on my system. Should I have built that separately? Anyway, thanks very much for all your help. Rob On Jan 7, 9:05 am, Phil Hagelberg p...@hagelb.org wrote: Rob Lachlan robertlach...@gmail.com writes: Thanks for the help. I had initially installed slime, clojure-mode and swank following the instructions athttp://riddell.us/tutorial/slime_swank/slime_swank.html I tried simply installing swank-clojure, but that seemed to conflict with what I already had. So I removed everything -- slime, clojure- mode, etc. and installed swank-clojure using ELPA. This in turn installed slime, slime-repl, swank-clojure, and clojure- mode. But now when I try M-x slime, I get: Searching for program: no such file or directory, lisp Sounds like you didn't quite remove everything from your old setup. There must still be some old slime code/configuration lying around somewhere. -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Rob Lachlan robertlach...@gmail.com writes: But having installed swank-clojure, I get an error: java.lang.ClassNotFoundException: swank.swank And I can't find swank-clojure.jar anywhere on my system. Should I have built that separately? Anyway, thanks very much for all your help. How did you launch it? If you use M-x swank-clojure-project, you'll need to use a dependency management system to place swank-clojure.jar in lib/, as it says in the readme. -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Hello, I have an emacs setup on OSX using elpa with the latest clojure-mode, swank-clojure, slime, slime-repl all from ELPA. When I upgraded to the latest swank-clojure in ELPA (swank-clojure-1.1.0), I began to get this error as well: Searching for program: no such file or directory, lisp I traced it back a bit, and found that the before advice on slime-read- interactive-args wasn't being called. It apparently wasn't activated. I evaluated the following form: (ad-activate 'slime-read-interactive-args) And now all seems to be working well. I'm not sure why this advice hasn't been activated. On the prior versions of swank-clojure, I didn't have this problem. Loading order issue maybe? Anyhow, try explicitly activating that advice and see if that fixes your problem. Cheers, Joel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Rob Lachlan robertlach...@gmail.com writes: I have src and test in the directory I'm passing in. The problem however, seems to be on the emacs end. In the mini-buffer when I enter in Project root: path-to-project and press return, the cursor just moves to the next line in the mini- buffer. So I think that the clojure-project function is getting stuck right at that spot. That's a bug that was fixed many months ago; sounds like you need to update your version of swank-clojure: http://github.com/technomancy/swank-clojure Installation is handled through Emacs' package manager: http://tromey.com/elpa/install.html -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
Thanks for the help. I had initially installed slime, clojure-mode and swank following the instructions at http://riddell.us/tutorial/slime_swank/slime_swank.html I tried simply installing swank-clojure, but that seemed to conflict with what I already had. So I removed everything -- slime, clojure- mode, etc. and installed swank-clojure using ELPA. This in turn installed slime, slime-repl, swank-clojure, and clojure- mode. But now when I try M-x slime, I get: Searching for program: no such file or directory, lisp Clearly, my emacs-fu is not strong enough. Any ideas? On Jan 6, 9:32 am, Phil Hagelberg p...@hagelb.org wrote: Rob Lachlan robertlach...@gmail.com writes: I have src and test in the directory I'm passing in. The problem however, seems to be on the emacs end. In the mini-buffer when I enter in Project root: path-to-project and press return, the cursor just moves to the next line in the mini- buffer. So I think that the clojure-project function is getting stuck right at that spot. That's a bug that was fixed many months ago; sounds like you need to update your version of swank-clojure: http://github.com/technomancy/swank-clojure Installation is handled through Emacs' package manager: http://tromey.com/elpa/install.html -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Having difficulties with compilation in slime, emacs and clojure-project
I've been trying to compile clojure files from emacs. The issue I run into is of my own clj files not being found on the classpath. (If I'm trying to compile a standalone file, which references only clojure core, there's no problem. It's when I have multiple files, and I'm trying to include a file of my own with use or require, that I run into this issue.) I found the clojure-project function, by Phil Hagelberg, at: http://www.mail-archive.com/clojure@googlegroups.com/msg18268.html but when I put it in .emacs, and invoked it, the function seemed to get stuck. I'm asked in the mini-buffer for the project root, and I write it in and press return, but nothing happens. I just keep getting carriage returns in the mini-buffer. Any ideas? Or are there any other convenient ways for managing class paths for various clojur projects in emacs? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
On 06.01.2010, at 07:26, Rob Lachlan wrote: but when I put it in .emacs, and invoked it, the function seemed to get stuck. I'm asked in the mini-buffer for the project root, and I write it in and press return, but nothing happens. I just keep getting carriage returns in the mini-buffer. Any ideas? The root directory should be a directory containing subdirectories src, test, and lib (each one is optional, but there needs to be at least one of them). src and test are put directly on the classpath, and all jar files in lib are added as well. Perhaps you specified as project root directlly the directory containing your source code? Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Having difficulties with compilation in slime, emacs and clojure-project
I have src and test in the directory I'm passing in. The problem however, seems to be on the emacs end. In the mini-buffer when I enter in Project root: path-to-project and press return, the cursor just moves to the next line in the mini- buffer. So I think that the clojure-project function is getting stuck right at that spot. On Jan 5, 11:01 pm, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 06.01.2010, at 07:26, Rob Lachlan wrote: but when I put it in .emacs, and invoked it, the function seemed to get stuck. I'm asked in the mini-buffer for the project root, and I write it in and press return, but nothing happens. I just keep getting carriage returns in the mini-buffer. Any ideas? The root directory should be a directory containing subdirectories src, test, and lib (each one is optional, but there needs to be at least one of them). src and test are put directly on the classpath, and all jar files in lib are added as well. Perhaps you specified as project root directlly the directory containing your source code? Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en