Skip to content


Subversion checkout URL

You can clone with
Download ZIP


nrepl-jack-in on Windows #248

mjewkes opened this Issue · 4 comments

3 participants


Line 1411 -

    (format "echo \"%s repl :headless\" | eval $SHELL -l" nrepl-lein-command))

Doesn't work on windows - eval not being a valid shell command. You can point this line manually at your file (mine looks like this now)

    (format "c:\\Users\\mjewkes\\Clojure\\%s repl :headless" nrepl-lein-command))

A better solution would be ideal.


I guess we could use a different command for Windows users conditionally. Any Windows users around here to add their input?


I do use it on Windows and nrepl-jack-in works for me.

It should only execute the

    (format "echo \"%s repl :headless\" | eval $SHELL -l" nrepl-lein-command))

if it cannot find lein or lein.bat in the exec-path.

So one solution is to add the location of lein.bat into your windows path (which I like to do anyway because I also use leiningen from the command line), or to append the location to the emacs exec-path:

(setq exec-path (append exec-path '("c:/Users/mjewkes/Clojure")))

nrepl-server-command is also a customizable variable, so you can set it to whatever value you want if the default doesn't work for you.

I am not sure the fallback echo lein repl :headless | ... would ever work on Windows anyway, with or without the eval.

Hope this helps.


@mjewkes Are you still having this problem? I would like to close this issue if possible.


@kingtim I have it working using the line change I described above. I opened the issue to see if there was a better solution that might be useful for other beginners.

@bbatsov bbatsov closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.