Thanks, this was really helpful. Here's what my shortcut looks like now:
(global-set-key
[f8]
'(lambda () (interactive)
(start-process "swank-clojure"
"*swank-clojure*"
"~/.lein/bin/swank-clojure")
(set-process-filter (get-buffer-process "*swank-clojure*")
(lambda (process output)
(when (string-match "Connection opened on" output)
(slime-connect "localhost" "4005")
(with-current-buffer (slime-output-buffer t)
(setq default-directory root))
(set-process-filter process nil))))))
On Mon, Oct 3, 2011 at 8:33 PM, Phil Hagelberg <[email protected]> wrote:
> On Mon, Oct 3, 2011 at 5:12 PM, Nicolas Buduroi <[email protected]>
> wrote:
> > Hi, I'm currently redoing my Clojure setup and I wonder how to make Emacs
> > wait for swank-clojure to be ready before calling slime-connect.
>
> You can use M-x clojure-jack-in, but that only works for Leiningen
> projects out of the box. The other place I'd look is M-x
> durendal-jack-in, which was its mostly-deprecated precursor. It has a
> less comprehensive bootstrap mechanism, but if you've already got
> slime-repl installed then that shouldn't be an issue.
>
> https://github.com/technomancy/durendal/blob/master/durendal.el#L82
>
> -Phil
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en