Re: Clojure/SLIME/Emacs questions
On Sat, Feb 13, 2010 at 5:48 AM, Steven E. Harris wrote: > Phil Hagelberg writes: > >> Upstream slime is not compatible with swank-clojure > > I find this not to be true at present, the stilted SLIME/Swank > connection problem¹ and disabling autodoc mode notwithstanding. Yes, I too use slime upstream and avoid elpa. I can't seem to get auto completion to work with Java functions which some folks on the irc said they could. Otherwise it works fine for me. -- Ramakrishnan -- 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: Clojure/SLIME/Emacs questions
Phil Hagelberg writes: > Upstream slime is not compatible with swank-clojure I find this not to be true at present, the stilted SLIME/Swank connection problem¹ and disabling autodoc mode notwithstanding. Footnotes: ¹ http://thread.gmane.org/gmane.comp.java.clojure.user/24894/focus=24956 -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
On Thu, Feb 11, 2010 at 1:20 PM, Jeff Kowalczyk wrote: > The installed packages: > > clojure-mode-1.6 > slime-20091016 > slime-repl-20091016 > swank-clojure-1.1.0 > > include snapshots of slime and slime/contrib/slime-repl.el. Will these > be merged with upstream slime soon? I spoke with the slime maintainers about merging my changes, but they weren't interested. The changes were pretty minor though. > I would like to track the repository versions of clojure, clojure- > contrib, clojure-mode, slime(-repl) and swank-clojure, using the ELPA > configuration as a guide. Upstream slime is not compatible with swank-clojure, so unless you do a lot of CL work I would strongly recommend against this. There have been a number of threads discussing this in the past; if you're interested in fixing this I could provide further information. -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: Clojure/SLIME/Emacs questions
On Jan 1, 1:45 pm, Phil Hagelberg wrote: > You can get this to work, but as you can see it's very manual and > error-prone. The basicslimeREPL is working using automated > installation from ELPA. I am using the ELPA installation method, it's working well via the automatic install. Thank you for providing this. The installed packages: clojure-mode-1.6 slime-20091016 slime-repl-20091016 swank-clojure-1.1.0 include snapshots of slime and slime/contrib/slime-repl.el. Will these be merged with upstream slime soon? I would like to track the repository versions of clojure, clojure- contrib, clojure-mode, slime(-repl) and swank-clojure, using the ELPA configuration as a guide. Thanks Jeff -- 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: Clojure/SLIME/Emacs questions
Rob Wolfe writes: >> installation from ELPA, and William Douglas is working on adding fuzzy >> completion to that. It's highly recommended that you follow this > > I will, if it will work. > >> approach rather than copying and pasting several pages of one-off >> configuration. For instance, adding jline to your classpath is redundant >> if you're using slime. > > Where do you see "several pages"? I don't like this error-prone manual > work, but so far only this work for me, that's why I showed this. Sorry, I didn't mean to be dismissive, just to suggest that you try to communicate with him to solve this problem as I believe the solution he's working on is the cleanest for moving forward. -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: Clojure/SLIME/Emacs questions
Phil Hagelberg writes: > Rob Wolfe writes: > >> Stefan Tilkov writes: >> >>> Two quick Emacs/Clojure questions I can't seem to find the answer to: >>> >>> - In his screencasts, Sean Devlin moves the mouse over an item in his >>> REPL history and it becomes highlighted (and he can paste it to the >>> current prompt with one click) >>> - Also in his screencasts, Lau Jensen types something like g-i-v, then hits >>> some key combination and gets an expansion like get-integer-value >>> >>> I can't seem to find out how to get these to work, any hint would be >>> appreciated. >> >> I did it like this (I assume that clojure-mode.el has been installed): >> >> 1. downloaded slime and swank-clojure > > You can get this to work, but as you can see it's very manual and > error-prone. The basic slime REPL is working using automated The question was not about "basic" slime REPL. > installation from ELPA, and William Douglas is working on adding fuzzy > completion to that. It's highly recommended that you follow this I will, if it will work. > approach rather than copying and pasting several pages of one-off > configuration. For instance, adding jline to your classpath is redundant > if you're using slime. Where do you see "several pages"? I don't like this error-prone manual work, but so far only this work for me, that's why I showed this. Sorry if it is a pain for you to read. 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
SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean (was: Clojure/SLIME/Emacs questions)
"Steven E. Harris" writes: > My next step will be to instrument the Swank side to see when > `connection-info' is being called. I found the problem: swank.util.sys/get-pid. It looks like the JMX call to get the PID hangs. If I visit the *inferior-lisp* buffer's REPL and evaluate the following form, the REPL finishes connecting immediately: ,[ Fragment of `get-pid' function ] | (.. java.lang.management.ManagementFactory | (getRuntimeMXBean) (getName) (split "@")) ` Apparently forcing more than one call through that path kicks it out of some wait, and the thread blocked on the Swank-side function `swank.commands.basic/connection-info' finally finishes its call to get-pid. Note that calling java.lang.management.ManagementFactory#getRuntimeMXBean() is not sufficient to unblock the thread in `connection-info'. It takes the following call to RuntimeMXBean#getName() to unblock the wait. Is there a separate mailing list to which I should report this problem? -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
Rob Wolfe writes: > Stefan Tilkov writes: > >> Two quick Emacs/Clojure questions I can't seem to find the answer to: >> >> - In his screencasts, Sean Devlin moves the mouse over an item in his >> REPL history and it becomes highlighted (and he can paste it to the >> current prompt with one click) >> - Also in his screencasts, Lau Jensen types something like g-i-v, then hits >> some key combination and gets an expansion like get-integer-value >> >> I can't seem to find out how to get these to work, any hint would be >> appreciated. > > I did it like this (I assume that clojure-mode.el has been installed): > > 1. downloaded slime and swank-clojure You can get this to work, but as you can see it's very manual and error-prone. The basic slime REPL is working using automated installation from ELPA, and William Douglas is working on adding fuzzy completion to that. It's highly recommended that you follow this approach rather than copying and pasting several pages of one-off configuration. For instance, adding jline to your classpath is redundant if you're using slime. -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: Clojure/SLIME/Emacs questions
"Steven E. Harris" writes: > This is the only content in the *slime-events* buffer while I'm waiting > for the connection to complete: > > ,[ *slime-events* buffer ] > | (:emacs-rex > | (swank:connection-info) > | "COMMON-LISP-USER" t 1) > ` I also confirmed that `slime-set-connection-info' isn't being called until after the long lag, which means that the REX above is part of what's hanging. Either the Swank side isn't receiving the request or it's not responding from the SLIME function `connection-info' in file basic.clj. The hang can be well /before/ this point too, but I've at least established that it's not after `slime-set-connection-info'. My next step will be to instrument the Swank side to see when `connection-info' is being called. -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
Rob Wolfe writes: > So how do you exactly start SLIME for Clojure? I've tried both `C-u - M-x slime RET clojure' and `run-clojure', which both amount to the same thing eventually > These settings: [...] > should cause automatic start of *inferior-lisp* and *slime-repl clojure* > after typing "M-x run-clojure" They do -- sometimes -- /eventually/. There is a very long gap between the *inferior-lisp* process starting and the SLIME-Swank connection completing, and the REPL appears only after that connection succeeds. > What do you see in *messages* buffer? The same as yours: ,[ *Messages* buffer ] | Polling "c:/DOCUME~1/seh/LOCALS~1/Temp/slime.5844".. | (Abort with `M-x slime-abort-connection'.) [22 times] | Connecting to Swank on port 3681.. [2 times] | Connected. Let the hacking commence! ` But note that the connection attempt message repeated 22 times. And in between the "connecting" and "connected" messages, there was a lag of maybe a minute, during which I went in and interacted with the Clojure REPL in the *inferior-lisp* buffer, trying to kick the connection to completion. If I just start SLIME and /don't/ interact with the *inferior-lisp* buffer, the connection "never" completes, or at least not within the five minutes I let it sit undisturbed. This is the only content in the *slime-events* buffer while I'm waiting for the connection to complete: ,[ *slime-events* buffer ] | (:emacs-rex | (swank:connection-info) | "COMMON-LISP-USER" t 1) ` > What version of Clojure do you use? The Clojure 1.1.0 Jar that I downloaded from code.google.com. > I use clojure.jar built from sources taken from GIT repository (I > tried Clojure 1.0 and it worked too). That's a good sign that something more recent than Clojure 1.0 should work. > I agree with Stefan Kamphausen that "connection-serve" in swank.clj > should not fail silently. Now we don't know what is the problem. I changed `connection-serve' per your suggestion. The Swank back-end didn't dump any exception traces to the *inferior-lisp* buffer. The behavior looks like it suffers a race, or maybe the socket connection request isn't noticed as intended. -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
"Steven E. Harris" writes: > Rob Wolfe writes: > >> I did it like this (I assume that clojure-mode.el has been installed): > > Thanks, Rob. I followed your instructions after not being able to get > Clojure to cooperate with my normal Swank/SLIME installation, and it > works, but only to a point: The SLIME REPL buffer (invoked via the > function `slime-repl') falls out of step with the *inferior-lisp* > buffer. So how do you exactly start SLIME for Clojure? These settings: (require 'slime) (slime-setup '(slime-repl)) (defun run-clojure () "Starts clojure in Slime" (interactive) (slime 'clojure)) should cause automatic start of *inferior-lisp* and *slime-repl clojure* after typing "M-x run-clojure" > > This never happens to me when using SLIME with a Common Lisp, such as > CLISP. Here, Clojure starts up just fine in the *inferior-lisp* buffer, > but the SLIME REPL doesn't seem to connect properly. Maybe it connects > at the network level, but each form entered in the SLIME REPL yields > messages like this in the minibuffer: > > , > | ; pipelined request... (swank:listener-eval " > ` What do you see in *messages* buffer? Maybe there are some helpful messages. I can see this: """ Polling "/tmp/slime.6251".. (Abort with `M-x slime-abort-connection'.) [31 times] Connecting to Swank on port 40585.. [2 times] Connected. Hacks and glory await! """ What version of Clojure do you use? I use clojure.jar built from sources taken from GIT repository (I tried Clojure 1.0 and it worked too). I agree with Stefan Kamphausen that "connection-serve" in swank.clj should not fail silently. Now we don't know what is the problem. If I were you I would change this function as Stefan suggested and see what is going on: (defn- connection-serve [conn] (let [control (dothread-swank (thread-set-name "Swank Control Thread") (try (control-loop conn) (catch Exception e ;; fail silently (.printStackTrace e) (.printStackTrace (.getCause e)) nil))) read (dothread-swank (thread-set-name "Read Loop Thread") (try (read-loop conn control) (catch Exception e ;; This could be put somewhere better (.interrupt control) (dosync (alter *connections* (partial remove #{conn}))] (dosync (ref-set (conn :control-thread) control) (ref-set (conn :read-thread) read > > That's a sign that the REPL is sending commands to the SWANK back-end, > but it's not receiving a timely response. Meanwhile, the Clojure REPL in > the *inferior-lisp* buffer remains responsive. > > Trying to evaluate Clojure forms from a buffer other than the REPL (via, > say, `C-x e', usually doesn't work. There's no error reported, but none > of the resulting values display in the minibuffer, and any definitions > evaluated there have no apparent side effect on the Clojure REPL > available in the *inferior-lisp* buffer. > > I've also noticed that the SLIME "presentations" feature doesn't work > with Clojure. That may be a symptom of the SLIME REPL not meeting up > properly with the Clojure REPL. Yes, apparently connection with *slime-repl clojure* failed and it does not work properly now. 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: Clojure/SLIME/Emacs questions
"Steven E. Harris" writes: > This morning, doing so makes things work much better. Still I see this in the *inferior-lisp* buffer when starting slime: , | (require 'swank.swank) | | (swank.swank/ignore-protocol-version "2009-12-23") | | (swank.swank/start-server "c:/DOCUME~1/seh/LOCALS~1/Temp/slime.3420" :encoding "iso-latin-1-unix") | | Listening for transport dt_socket at address: | Clojure 1.1.0 | user=> | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | WARNING: reader macro ^ is deprecated; use meta instead | nil | user=> user=> "2009-12-23" | user=> user=> Connection opened on local port 3464 | # | user=> user=> user=> ` Note that I'm using Clojure 1.1.0. Could that be the problem? This is within GNU Emacs 23.1.1 on Windows XP. Once that *inferior-lisp* buffer is up, if I run `slime-repl', the REPL may take an arbitrarily long time to finally connect to Swank. And if it does ever connect, and I shut it down via the "sayoonara" command, I can't get it to start again successfully. -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
Stefan Kamphausen writes: > you may want to read the thread > http://groups.google.com/group/clojure/browse_frm/thread/3e5f416e3f2a1884/337057edae5dcdc3 I had read that thread /twice/ before, as well as the thread on the SLIME mailing list, but I had neglected to try disabling autodoc-mode. This morning, doing so makes things work much better. However, I still notice that when I first run SLIME, the *inferior-lisp* buffer comes up with a responsive REPL, but the SLIME REPL connection is flaky. It takes a long time to finally come through, if it ever does. Perhaps there's some race condition there. Sometimes taking focus away from the Emacs window, doing something, else, and returning to Emacs will cause the SLIME REPL to finally wake up and finish its connection sequence. At that point the animated REPL banner flies out and I have a working REPL. But presentations still don't work. -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
On 01.01.2010, at 17:29, Stefan Kamphausen wrote: > I had some errors before compiling and putting the resulting JAR on > the CP. But I'm not much of a Java-hero. What is your classpath? I > have swank-clojure/target/swank-clojure-1.0-SNAPSHOT.jar on it. I always work with the latest Clojure ("new" branch from github). Here's my swank setup in .emacs: (setq swank-clojure-classpath (list "~/Development/clojure/clojure.jar" "~/Development/clojure-contrib/clojure-contrib.jar" "~Development/clojure-dev-utilities")) The last entry is a directory which contains among other stuff the directory "swank" that contains swank.clj and the rest of the swank 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: Clojure/SLIME/Emacs questions
Hi, On Jan 1, 4:35 pm, Konrad Hinsen wrote: > On 01.01.2010, at 12:30, Stefan Kamphausen wrote: > > The only part that feels tricky is compiling swank for which I needed > > a Maven setup, IIRC. > > I just run swank from source code, uncompiled. No Maven, no worry :-) I had some errors before compiling and putting the resulting JAR on the CP. But I'm not much of a Java-hero. What is your classpath? I have swank-clojure/target/swank-clojure-1.0-SNAPSHOT.jar on it. Cheers, Stefan -- 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: Clojure/SLIME/Emacs questions
On 01.01.2010, at 12:30, Stefan Kamphausen wrote: > FWIW I have never touched ELPA but got a setup with SLIME from CVS > plus SBCL and Clojure. A rudimentary description can be found at > http://www.skamphausen.de/cgi-bin/ska/My_Clojure_Setup > > The only part that feels tricky is compiling swank for which I needed > a Maven setup, IIRC. I just run swank from source code, uncompiled. No Maven, no worry :-) 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: Clojure/SLIME/Emacs questions
and FWIW I got the whole thing going without ELPA by using the instructions here: http://learnclojure.blogspot.com/2009/11/installing-clojure-on-ubuntu-910-karmic.html but on OSX. On 1 Jan 2010, at 11:30, Stefan Kamphausen wrote: > FWIW I have never touched ELPA but got a setup with SLIME from CVS > plus SBCL and Clojure. A rudimentary description can be found at > http://www.skamphausen.de/cgi-bin/ska/My_Clojure_Setup > > The only part that feels tricky is compiling swank for which I needed > a Maven setup, IIRC. > > Regards, > Stefan > > -- > 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 Edmund "The future is here. It's just not widely distributed yet" -- Gibson -- 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: Clojure/SLIME/Emacs questions
FWIW I have never touched ELPA but got a setup with SLIME from CVS plus SBCL and Clojure. A rudimentary description can be found at http://www.skamphausen.de/cgi-bin/ska/My_Clojure_Setup The only part that feels tricky is compiling swank for which I needed a Maven setup, IIRC. Regards, Stefan -- 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: Clojure/SLIME/Emacs questions
Indeed -- that works nicely. I tried going back to a completely non-ELPA-ized setup, but it was too painful; the trick was installing technomancy's github repo of slime *in addition* to the ELPA packages, which all depend on each other. -Steve On 31 Dec 2009, at 16:44, william douglas wrote: >> Well, it clearly works for Lau, but then he says in one of the screencasts >> that he's using an old version of Slime; if you install technomancy's slime >> package from > ELPA, I believe you don't get all the slime extensions, which >> would easily explain why the fuzzy completion doesn't work. I'm using that >> slime from ELPA, and > > fuzzy completion is also not working for me. > > Right now the ELPA slime package does not include contrib (which > contains slime-fuzzy and a number of other things). I am attempting > to add just the required pieces to ELPA to get slime-fuzzy working. > If you would like fuzzy complete to work before this, you will want to > grab slime from technomancy's github repo and then add something like > the following to your .emacs: > > (add-to-list 'load-path "~/slime/contrib/") > (eval-after-load "slime" > '(progn > (require 'slime-fuzzy) > (setq slime-complete-symbol*-fancy t) > (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) > > Note that if you are using slime-connect the fuzzy complete might not > work though the following patch may fix that for you if you are using > lein swank to launch your swank session (patch from Takeshi Banse, > tak...@laafc.net): > > diff --git a/src/leiningen/core.clj b/src/leiningen/core.clj > index a5261f4..685aab1 100644 > --- a/src/leiningen/core.clj > +++ b/src/leiningen/core.clj > @@ -81,4 +81,5 @@ (defn -main [& [task & args]] > (abort (format "Wrong number of arguments to task %s." >task) >;; In case tests or some other task started any: > -(shutdown-agents))) > +;;(shutdown-agents) > +)) > > -- > 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 > -- 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: Clojure/SLIME/Emacs questions
Hi, do you use a rather recent checkout of SLIME? If so, you may want to read the thread http://groups.google.com/group/clojure/browse_frm/thread/3e5f416e3f2a1884/337057edae5dcdc3 Can't say whether that's related to your problem, though. Cheers, Stefan -- 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: Clojure/SLIME/Emacs questions
Rob Wolfe writes: > I did it like this (I assume that clojure-mode.el has been installed): Thanks, Rob. I followed your instructions after not being able to get Clojure to cooperate with my normal Swank/SLIME installation, and it works, but only to a point: The SLIME REPL buffer (invoked via the function `slime-repl') falls out of step with the *inferior-lisp* buffer. This never happens to me when using SLIME with a Common Lisp, such as CLISP. Here, Clojure starts up just fine in the *inferior-lisp* buffer, but the SLIME REPL doesn't seem to connect properly. Maybe it connects at the network level, but each form entered in the SLIME REPL yields messages like this in the minibuffer: , | ; pipelined request... (swank:listener-eval " ` That's a sign that the REPL is sending commands to the SWANK back-end, but it's not receiving a timely response. Meanwhile, the Clojure REPL in the *inferior-lisp* buffer remains responsive. Trying to evaluate Clojure forms from a buffer other than the REPL (via, say, `C-x e', usually doesn't work. There's no error reported, but none of the resulting values display in the minibuffer, and any definitions evaluated there have no apparent side effect on the Clojure REPL available in the *inferior-lisp* buffer. I've also noticed that the SLIME "presentations" feature doesn't work with Clojure. That may be a symptom of the SLIME REPL not meeting up properly with the Clojure REPL. -- Steven E. Harris -- 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: Clojure/SLIME/Emacs questions
Thanks for the quick response to everyone. I downloaded slime-fuzzy.el from here: http://elder-gods.org/~larry/repos/slime-tracker/contrib/slime-fuzzy.el , put it into ~/.emacs.d/misc and then added this to my ~/.emacs: (setq load-path (cons "~/.emacs.d/misc" load-path)) (eval-after-load "slime" '(progn (require 'slime-fuzzy) (setq slime-complete-symbol*-fancy t) (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) … and everything works perfectly. Stefan On Dec 31, 2009, at 5:44 PM, william douglas wrote: >> Well, it clearly works for Lau, but then he says in one of the screencasts >> that he's using an old version of Slime; if you install technomancy's slime >> package from > ELPA, I believe you don't get all the slime extensions, which >> would easily explain why the fuzzy completion doesn't work. I'm using that >> slime from ELPA, and > > fuzzy completion is also not working for me. > > Right now the ELPA slime package does not include contrib (which > contains slime-fuzzy and a number of other things). I am attempting > to add just the required pieces to ELPA to get slime-fuzzy working. > If you would like fuzzy complete to work before this, you will want to > grab slime from technomancy's github repo and then add something like > the following to your .emacs: > > (add-to-list 'load-path "~/slime/contrib/") > (eval-after-load "slime" > '(progn > (require 'slime-fuzzy) > (setq slime-complete-symbol*-fancy t) > (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) > > Note that if you are using slime-connect the fuzzy complete might not > work though the following patch may fix that for you if you are using > lein swank to launch your swank session (patch from Takeshi Banse, > tak...@laafc.net): > > diff --git a/src/leiningen/core.clj b/src/leiningen/core.clj > index a5261f4..685aab1 100644 > --- a/src/leiningen/core.clj > +++ b/src/leiningen/core.clj > @@ -81,4 +81,5 @@ (defn -main [& [task & args]] > (abort (format "Wrong number of arguments to task %s." >task) >;; In case tests or some other task started any: > -(shutdown-agents))) > +;;(shutdown-agents) > +)) > > -- > 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 -- 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: Clojure/SLIME/Emacs questions
Stefan Tilkov writes: > Two quick Emacs/Clojure questions I can't seem to find the answer to: > > - In his screencasts, Sean Devlin moves the mouse over an item in his > REPL history and it becomes highlighted (and he can paste it to the > current prompt with one click) > - Also in his screencasts, Lau Jensen types something like g-i-v, then hits > some key combination and gets an expansion like get-integer-value > > I can't seem to find out how to get these to work, any hint would be > appreciated. I did it like this (I assume that clojure-mode.el has been installed): 1. downloaded slime and swank-clojure $ pwd /home/rw/opt/slime $ head -n 1 .git/remotes/origin URL: git://git.boinkor.net/slime.git $ git pull Already up-to-date. $ pwd /home/rw/opt/swank-clojure $ head -n 1 .git/remotes/origin URL: git://github.com/jochu/swank-clojure.git $ git pull Already up-to-date. 2. configured Emacs (version: GNU Emacs 23.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.12.11)) <.emacs> (add-to-list 'load-path "~/opt/slime/") (add-to-list 'load-path "~/opt/slime/contrib/") (add-to-list 'load-path "~/opt/swank-clojure/src/emacs") (require 'clojure-mode) (setq auto-mode-alist (cons '("\\.clj$" . clojure-mode) auto-mode-alist)) (require 'swank-clojure-autoload) (swank-clojure-config (setq swank-clojure-jar-path "~/opt/clojure/clojure-git.jar") (setq swank-clojure-extra-classpaths (list "~/opt/clojure/jline.jar" "~/src/clojure/gnu/clojure/clojure/src/jvm")) (setq swank-clojure-extra-vm-args '("-agentlib:jdwp=transport=dt_socket,address=,server=y,suspend=n"))) (require 'slime) (slime-setup '(slime-repl)) (add-hook 'clojure-mode-hook '(lambda () (define-key clojure-mode-map "\C-cc" 'comment-region) (define-key clojure-mode-map "\C-cu" 'uncomment-region))) (eval-after-load "slime" '(progn (require 'slime-fuzzy) (setq slime-complete-symbol*-fancy t) (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) (defun run-clojure () "Starts clojure in Slime" (interactive) (slime 'clojure)) And now "M-x run-clojure" starts slime with working completion. For example after writing "w-o" and hitting TAB key I can see this: user> (w-o Completion:Flags: Score: -- with-open -f---m-- 20,43 with-out-str -f---m-- 20,00 [...] 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: Clojure/SLIME/Emacs questions
> Well, it clearly works for Lau, but then he says in one of the screencasts > that he's using an old version of Slime; if you install technomancy's slime > package from > ELPA, I believe you don't get all the slime extensions, which > would easily explain why the fuzzy completion doesn't work. I'm using that > slime from ELPA, and > > fuzzy completion is also not working for me. Right now the ELPA slime package does not include contrib (which contains slime-fuzzy and a number of other things). I am attempting to add just the required pieces to ELPA to get slime-fuzzy working. If you would like fuzzy complete to work before this, you will want to grab slime from technomancy's github repo and then add something like the following to your .emacs: (add-to-list 'load-path "~/slime/contrib/") (eval-after-load "slime" '(progn (require 'slime-fuzzy) (setq slime-complete-symbol*-fancy t) (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) Note that if you are using slime-connect the fuzzy complete might not work though the following patch may fix that for you if you are using lein swank to launch your swank session (patch from Takeshi Banse, tak...@laafc.net): diff --git a/src/leiningen/core.clj b/src/leiningen/core.clj index a5261f4..685aab1 100644 --- a/src/leiningen/core.clj +++ b/src/leiningen/core.clj @@ -81,4 +81,5 @@ (defn -main [& [task & args]] (abort (format "Wrong number of arguments to task %s." task) ;; In case tests or some other task started any: -(shutdown-agents))) +;;(shutdown-agents) +)) -- 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: Clojure/SLIME/Emacs questions
On Dec 31, 2009, at 4:39 PM, Sean Devlin wrote: > Stefan, > I run OSX, so I use command-click to bring the item to my REPL. I > imagine a right click would do the job in other platforms. > Thanks Sean, but I am on OS X too – the line simply doesn't get highlighted, so I assumed there must be some difference in our setup. Best, Stefan > Sean > > On Dec 31, 6:15 am, Stefan Tilkov wrote: >> Two quick Emacs/Clojure questions I can't seem to find the answer to: >> >> - In his screencasts, Sean Devlin moves the mouse over an item in his REPL >> history and it becomes highlighted (and he can paste it to the current >> prompt with one click) >> - Also in his screencasts, Lau Jensen types something like g-i-v, then hits >> some key combination and gets an expansion like get-integer-value >> >> I can't seem to find out how to get these to work, any hint would be >> appreciated. >> >> Thanks, >> Stefan >> >> -- >> Stefan Tilkov,http://www.innoq.com/blog/st/ > > -- > 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 -- 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: Clojure/SLIME/Emacs questions
Stefan, I run OSX, so I use command-click to bring the item to my REPL. I imagine a right click would do the job in other platforms. Sean On Dec 31, 6:15 am, Stefan Tilkov wrote: > Two quick Emacs/Clojure questions I can't seem to find the answer to: > > - In his screencasts, Sean Devlin moves the mouse over an item in his REPL > history and it becomes highlighted (and he can paste it to the current prompt > with one click) > - Also in his screencasts, Lau Jensen types something like g-i-v, then hits > some key combination and gets an expansion like get-integer-value > > I can't seem to find out how to get these to work, any hint would be > appreciated. > > Thanks, > Stefan > > -- > Stefan Tilkov,http://www.innoq.com/blog/st/ -- 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: Clojure/SLIME/Emacs questions
On 31 dec, 13:07, Baishampayan Ghose wrote: > > This one is called fuzzy-completion, which for some unknown reasons > doesn't work with SLIME + Clojure. > > It used to work perfectly with Common Lisp. I would appreciate a > solution to this too. Works for me, but you must have slime-fuzzy or slime-fancy enabled. So you need something like this in your emacs config: (slime-setup '(slime-fancy ;; turns on fancy inspector, autodoc and other useful stuff slime-highlight-edits)) This binds (slime-fuzzy-complete-symbol) to C-c M-i You can also use hippie-expand, which does the same sort of completion, but doesn't query the running lisp. Joost. -- 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: Clojure/SLIME/Emacs questions
Well, it clearly works for Lau, but then he says in one of the screencasts that he's using an old version of Slime; if you install technomancy's slime package from ELPA, I believe you don't get all the slime extensions, which would easily explain why the fuzzy completion doesn't work. I'm using that slime from ELPA, and fuzzy completion is also not working for me. When the fuzzy completion extension *is* available, then the following should work to enable it: (eval-after-load "slime" '(progn (require 'slime-fuzzy) (setq slime-complete-symbol*-fancy t) (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) -Steve On 31 Dec 2009, at 12:07, Baishampayan Ghose wrote: >> - Also in his screencasts, Lau Jensen types something like g-i-v, >> then hits some key combination and gets an expansion like >> get-integer-value > > This one is called fuzzy-completion, which for some unknown reasons > doesn't work with SLIME + Clojure. > > It used to work perfectly with Common Lisp. I would appreciate a > solution to this too. > > Regards, > BG > > -- > Baishampayan Ghose > oCricket.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 > 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 > -- 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: Clojure/SLIME/Emacs questions
> - Also in his screencasts, Lau Jensen types something like g-i-v, > then hits some key combination and gets an expansion like > get-integer-value This one is called fuzzy-completion, which for some unknown reasons doesn't work with SLIME + Clojure. It used to work perfectly with Common Lisp. I would appreciate a solution to this too. Regards, BG -- Baishampayan Ghose oCricket.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 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: Clojure/SLIME/Emacs questions
I probably should have mentioned that I have Emacs/SLIME/Clojure working together nicely already, it's particularly these features that are missing. Stefan On Dec 31, 2009, at 12:15 PM, Stefan Tilkov wrote: > Two quick Emacs/Clojure questions I can't seem to find the answer to: > > - In his screencasts, Sean Devlin moves the mouse over an item in his REPL > history and it becomes highlighted (and he can paste it to the current prompt > with one click) > - Also in his screencasts, Lau Jensen types something like g-i-v, then hits > some key combination and gets an expansion like get-integer-value > > I can't seem to find out how to get these to work, any hint would be > appreciated. > > Thanks, > Stefan > > -- > Stefan Tilkov, http://www.innoq.com/blog/st/ > > -- > 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 -- 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
Clojure/SLIME/Emacs questions
Two quick Emacs/Clojure questions I can't seem to find the answer to: - In his screencasts, Sean Devlin moves the mouse over an item in his REPL history and it becomes highlighted (and he can paste it to the current prompt with one click) - Also in his screencasts, Lau Jensen types something like g-i-v, then hits some key combination and gets an expansion like get-integer-value I can't seem to find out how to get these to work, any hint would be appreciated. Thanks, Stefan -- Stefan Tilkov, http://www.innoq.com/blog/st/ -- 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