technomancy / swank-clojure

Swank/slime support for clojure
Eclipse Public License 1.0
412 stars 83 forks source link

clojure-jack-in on Windows #52

Closed semperos closed 13 years ago

semperos commented 13 years ago

I'm running Windows 7, Emacs 24. I installed swank-clojure per the new instructions, lein plugin install swank-clojure 1.4.0-SNAPSHOT. Within Emacs, I open eshell (per your video), navigate to a Clojure project, run lein deps and then try M-x clojure-jack-in.

Immediately after running that Emacs function, another buffer opens stating "The system cannot find the path specified". The minibuffer has "cd ~/my-clojure-project && lein jack-in 1187: exited abnormally with code 1.".

Seems like it's probably something simple. Any ideas?

scottjad commented 13 years ago

I'm guessing clojure-jack-in wasn't tested on Windows for lack of a Windows box and is awaiting patches. I'd guess ~ doesn't work on windows and you'd need to use $HOME. Not sure if && works.

semperos commented 13 years ago

I've tested && and I've explicitly set $HOME in my environment variables, so I don't think those are the issues, though yes ~ doesn't work on Windows.

If/when I have time, I'll attempt to dig deeper, but at this point I don't completely grok where all of the evaluation is happening (how much is Emacs, how much is depending on OS shell commands, how much is Clojure, etc.).

semperos commented 13 years ago

Actually, this is probably more of a clojure-mode issue. Looking at the clojure-jack-in defun in clojure-mode.el, it uses the shell-command function, so yes, it's dropping down to the system shell to execute those commands.

technomancy commented 13 years ago

Does it work if you call expand-file-name on clojure-root before passing it to format?

semperos commented 13 years ago

Yes, it does, and I just sent one of those "fork and edit this page" pull requests via the Github website.

Thanks.