I learned a new trick today, that seemed useful, and potentially should either be documented or easier to setup. I was working on a project using multiple profiles that adjusted the dependencies, but having difficulty using nrepl as it was not executing lein with-profiles dev,1.4 nrepl :headless. So I dug into nrepl.el and found lein-server-command. I considered changing it to add support for profiles, but then I remembered that emacs supports project local variables. So added the following .dir-locals.el file at the same level as the project.clj with the following content:
((nrepl-mode .
((nrepl-server-command . "lein with-profile dev,1.4 repl :headless"))))
Now when I run nrepl-jack-in it makes me confirm I want to use .dir-local overridden variables, but it always includes those profiles.
Anyway, not sure if any additional changes need to be made to the mode, but perhaps documenting this in the README for nrepl might be appropriate? I'm happy to write up the changes in a PR, but thought I would inquire if this was helpful for anyone else. It's also applicable for changing nrepl-ritz-server-command.
Charles Comstock