Phil Hagelberg <
ph...@hagelb.org> writes:
> Phillip Lord writes:
>
>>> Happy to get more help on it. I think that's probably a better place for
>>> this kind of thing than nrepl.el.
>>
>> That sounds perfectly reasonable, at least assuming that nrepl can also
>> use this to launch lein for its own purposes. I guess then the two
>> packages would depend on each other.
>
> I'd rather have lein.el enhance nrepl.el when it's installed rather than
> introduce a dependency. nrepl.el could suggest installing lein.el if it
> notices that Leiningen's not installed already once lein.el is stable
> and suitable for everyday use. Circular dependencies are always more
> trouble than they're worth.
Yes, I agree. But, the level of dependency between the two packages that
you are talking of is significant enough, that I wonder whether there
really are two packages there. Still, regardless, it would be a good
thing to do.
I am still confused by the last form in nrepl-server-command
(if (or (locate-file nrepl-lein-command exec-path)
(locate-file (format "%s.bat" nrepl-lein-command) exec-path))
(format "%s repl :headless" nrepl-lein-command)
(format "echo \"%s repl :headless\" | eval $SHELL -l" nrepl-lein-command))
Under what circumstances will this find lein that they others don't? I
can think of only one, which is when someone launches Emacs outside of
their login shell. It effectively means that nrepl.el doesn't pick up
that lein is missing cleanly. AFAIK, it also means that emacs requires a
restart to pick up a newly installed lein.
>
>> The answer is nearly. Unfortunately, the getting lein.bat fails on my
>> windows box. The problem is that lein.bat comes from https, which
>> requires GnuTLS. So, you have to install that library, and set the path
>> so emacs can find it. Sort of defeats the point. I tried getting
>> lein.bat from the equivalent http, but it just redirects.
>
> I think newer versions of Emacs bundle TLS libraries in-process instead
> of calling out to them, so that might help?
It would, if it is the case. Currently, though, the easiest solution I
have found is to dump the GnuTLS DLLs into the Emacs directory.
I have pushed some more changes to my nrepl.el fork, for Emacs on W32.
I'll send a pull request if there is interest!
Phil