On Jun 9, 6:14 pm, Mark Engelberg <[email protected]> wrote:
> On Thu, Jun 9, 2011 at 8:20 AM, Jeff Dik <[email protected]> wrote:
> > 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.
Wow, that looks an awful lot like a bug in Emacs to me. expand-file-
name really should return paths that work with the host OS.
> This worked for me! I recommend this magical change be rolled into
> any future version of clojure-mode.
I can't really do that as it's flagrantly nonportable. However, it may
be that we can just rely on Leiningen to find the project root
instead. Does this work?
(defun clojure-jack-in ()
(interactive)
;; graaaahhhh--no closures in elisp (23)
(setq clojure-swank-port (+ 1024 (* (random 64512))))
(shell-command (format clojure-swank-command clojure-swank-port)
"*swank*")
(set-process-filter (get-buffer-process "*swank*")
(lambda (process output)
(with-current-buffer "*swank*"
(insert output))
(when (string-match "proceed to jack in"
output)
(with-current-buffer "*swank*"
(kill-region (save-excursion
(goto-char (point-max))
(search-backward "slime-
load-hook")
(forward-line)
(point))
(point-max)))
(eval-buffer "*swank*")
(slime-connect "localhost" clojure-swank-
port)
(set-process-filter process nil))))
(message "Starting swank server..."))
-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