Sunday, 18 August 2013

How do I choose/switch Leiningen profiles with Emacs nREPL?

How do I choose/switch Leiningen profiles with Emacs nREPL?

I have a :dev profile set up in my leiningen project file. This defines an
:init and :init-ns setting for my repl session. If I launch nrepl in emacs
(M-x nrepl-jack-in) with the cursor over the :dev keyword in my
project.clj, the repl launches and the :init and :init-ns settings are
used. If I have my cursor elsewhere, the initial namespace is different (a
test ns, not user), and :init hasn't been evaluated.
I'm guessing it's a feature of some sort, but can anyone explain it or
point me at the docs that do so? Also, is there any way to change the
profile once the repl's been launched?
Thanks

No comments:

Post a Comment