Re: swank-clojure: swank-clojure-init-files not used
On Mar 17, 11:10 am, Tassilo Horn wrote: > "AndrewC." writes: > > The other problem is that it uses add-to-list so if you reload slime > > to refresh the value of slime-lisp-implementations, you end up with > > two clojure entries in the list. > > Why do you think? add-to-list adds only if there's no such item in the > list already. I think the fact that the classpaths differ means the items differ and so you get two entries for clojure with different classpaths. > > I don't have a good solution, so I just run this by hand when I've > > changedswank-clojure-extra-classpaths: > > > (setq slime-lisp-implementations `((clojure ,(swank-clojure-cmd) :init > >swank-clojure-init))) > > In <87fxhd2qte@thinkpad.tsdh.de> I describe how I solved it now. I'm using your config now. Thanks :) --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
"AndrewC." writes: > On Mar 16, 2:08 pm, David Nolen wrote: >> On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn wrote: >> >> >> >> > When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting >> > SLIME, htop shows that this directory is not in the -cp java option. >> > Sending a SIGINT kills the clojure process and doesn't interrupt the >> > current Thread only... >> >> I've noted that you cannot interactively change that variable. If you >> change it you must restart your emacs session for it to take effect. If you >> haven't already checked this of course. > > The problem here is that swank-clojure adds clojure to the slime-lisp- > implementations once only after slime is loaded. Exactly, and my configs where set after swank-clojure was loaded. Unfortunately slime is loaded first. See <87fxhd2qte@thinkpad.tsdh.de> for details. > The other problem is that it uses add-to-list so if you reload slime > to refresh the value of slime-lisp-implementations, you end up with > two clojure entries in the list. Why do you think? add-to-list adds only if there's no such item in the list already. > I don't have a good solution, so I just run this by hand when I've > changed swank-clojure-extra-classpaths: > > (setq slime-lisp-implementations `((clojure ,(swank-clojure-cmd) :init > swank-clojure-init))) In <87fxhd2qte@thinkpad.tsdh.de> I describe how I solved it now. -- Richard Stallman can solve the halting problem... in polynomial time. --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
On Mar 16, 2:08 pm, David Nolen wrote: > On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn wrote: > > > > > When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting > > SLIME, htop shows that this directory is not in the -cp java option. > > Sending a SIGINT kills the clojure process and doesn't interrupt the > > current Thread only... > > I've noted that you cannot interactively change that variable. If you > change it you must restart your emacs session for it to take effect. If you > haven't already checked this of course. The problem here is that swank-clojure adds clojure to the slime-lisp- implementations once only after slime is loaded. The other problem is that it uses add-to-list so if you reload slime to refresh the value of slime-lisp-implementations, you end up with two clojure entries in the list. I don't have a good solution, so I just run this by hand when I've changed swank-clojure-extra-classpaths: (setq slime-lisp-implementations `((clojure ,(swank-clojure-cmd) :init swank-clojure-init))) --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
swank-clojure: init-files / classpath troubles solved (was: swank-clojure: swank-clojure-init-files not used)
Hi all, now I've solved my "swank-clojure doesn't use my extra classpath and init files" problems. This didn't work, cause I had something like this in my .emacs: --8<---cut here---start->8--- (add-to-list 'load-path "~/repos/el/swank-clojure") (setq swank-clojure-jar-path "~/repos/clj/clojure/clojure.jar") (require 'swank-clojure-autoload) (swank-clojure-config (add-to-list 'swank-clojure-extra-classpaths "~/repos/clj/programming-clojure/") (add-to-list 'swank-clojure-init-files (expand-file-name "~/.clojure/user.clj"))) --8<---cut here---end--->8--- The problem was, that in the required autoload file there's --8<---cut here---start->8--- (eval-after-load "slime" '(progn (require 'swank-clojure) (add-to-list 'slime-lisp-implementations `(clojure ,(swank-clojure-cmd) :init swank-clojure-init) t) (add-hook 'slime-indentation-update-hooks 'swank-clojure-update-indentation) (add-hook 'slime-repl-mode-hook 'swank-clojure-slime-repl-modify-syntax t) (add-hook 'clojure-mode-hook 'swank-clojure-slime-mode-hook t))) --8<---cut here---end--->8--- so after loading slime, the clojure command is build by calling `swank-clojure-cmd'. Unfortunately at slime load time the init files and extra classpaths weren't set, cause `swank-clojure-config' is only a wrapper around (eval-after-load "swank-clojure" ...). So for now I use --8<---cut here---start->8--- (add-to-list 'load-path "~/repos/el/swank-clojure") (setq swank-clojure-jar-path "~/repos/clj/clojure/clojure.jar") (eval-after-load 'swank-clojure '(progn (add-to-list 'swank-clojure-extra-classpaths "~/repos/clj/programming-clojure/") (add-to-list 'swank-clojure-init-files (expand-file-name "~/.clojure/user.clj" (require 'swank-clojure-autoload) --8<---cut here---end--->8--- which seems to work. It's absolutely necessary to require the autoload file after the eval-after-load! So I'd vote for removing the `swank-clojure-config' wrapper. It confuses more than it helps. Bye, Tassilo --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
David Nolen writes: Hi David, >> When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and >> starting SLIME, htop shows that this directory is not in the -cp java >> option. Sending a SIGINT kills the clojure process and doesn't >> interrupt the current Thread only... > > I've noted that you cannot interactively change that variable. If you > change it you must restart your emacs session for it to take > effect. If you haven't already checked this of course. I've checked that right now to be sure, and still ~/.clojure/ is not added to the classpath option of the java invocation command line. Bye, Tassilo -- Windows: So easy to admin, even a worm can do it. --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn wrote: > > > When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting > SLIME, htop shows that this directory is not in the -cp java option. > Sending a SIGINT kills the clojure process and doesn't interrupt the > current Thread only... > I've noted that you cannot interactively change that variable. If you change it you must restart your emacs session for it to take effect. If you haven't already checked this of course. David --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
Cosmin Stejerean writes: Hi Cosmin, >> I'd like that slime loads ~/.clojure/user.clj when starting the >> clojure REPL. Therefore I added that file to >> `swank-clojure-init-files'. This variable is used in >> `swank-clojure-cmd' to build the java invocation command line. >> >> But that didn't work. So I wanted to debug `swank-clojure-cmd' to >> see what's wrong, but it seems that whole function is never called >> when I do `M-x slime'. >> >> I use the current HEAD versions of both swank-clojure and slime from >> their respective version control systems. > > As a workaround you can try adding ~/.clojure to the classpath, > Clojure will automatically load user.clj if found on the classpath. Yes, I've thought that, too. But incidentially swank-clojure seems to add only jar files in `swank-clojure-extra-classpaths' to the classpath. By default that are all jars in ~/.clojure + all jars in `swank-clojure-extra-classpaths'. When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting SLIME, htop shows that this directory is not in the -cp java option. Sending a SIGINT kills the clojure process and doesn't interrupt the current Thread only... Bye, Tassilo --~--~-~--~~~---~--~~ 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 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: swank-clojure: swank-clojure-init-files not used
On Sun, Mar 15, 2009 at 1:41 PM, Tassilo Horn wrote: > > Hi, > > I'd like that slime loads ~/.clojure/user.clj when starting the clojure > REPL. Therefore I added that file to `swank-clojure-init-files'. This > variable is used in `swank-clojure-cmd' to build the java invocation > command line. > > But that didn't work. So I wanted to debug `swank-clojure-cmd' to see > what's wrong, but it seems that whole function is never called when I do > `M-x slime'. > > I use the current HEAD versions of both swank-clojure and slime from > their respective version control systems. > As a workaround you can try adding ~/.clojure to the classpath, Clojure will automatically load user.clj if found on the classpath. -- Cosmin Stejerean http://offbytwo.com --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
swank-clojure: swank-clojure-init-files not used
Hi, I'd like that slime loads ~/.clojure/user.clj when starting the clojure REPL. Therefore I added that file to `swank-clojure-init-files'. This variable is used in `swank-clojure-cmd' to build the java invocation command line. But that didn't work. So I wanted to debug `swank-clojure-cmd' to see what's wrong, but it seems that whole function is never called when I do `M-x slime'. I use the current HEAD versions of both swank-clojure and slime from their respective version control systems. Bye, Tassilo -- Richard Stallman didn't write the GPL. He is the GPL. --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---