Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile selection at cider-jack-in #744

Closed
phillord opened this issue Aug 22, 2014 · 3 comments
Closed

Profile selection at cider-jack-in #744

phillord opened this issue Aug 22, 2014 · 3 comments

Comments

@phillord
Copy link
Contributor

I would like to be able to edit the lein command used for cider-jack-in so that I can change profile.
There was support for this in 0.7 although it was broken. Commit 3e5a73b fixed the breakage by removing the support!

Workaround is to launch lein myself, or set-variable cider-lein-parameters

@jiacai2050
Copy link
Contributor

For anyone else need this feature, try this:

(defun start-cider-repl-with-profile ()
  (interactive)
  (letrec ((profile (read-string "Enter profile name: "))
           (lein-params (concat "with-profile +" profile " repl :headless")))
    (message "lein-params set to: %s" lein-params)
    (set-variable 'cider-lein-parameters lein-params)
    (cider-jack-in)))

@MarchLiu
Copy link

For anyone else need this feature, try this:

(defun start-cider-repl-with-profile ()
  (interactive)
  (letrec ((profile (read-string "Enter profile name: "))
           (lein-params (concat "with-profile +" profile " repl :headless")))
    (message "lein-params set to: %s" lein-params)
    (set-variable 'cider-lein-parameters lein-params)
    (cider-jack-in)))

I get a error like "eval-region: Wrong number of arguments: (1 . 1), 0" in GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-04-13. But just a very little rewrite:

(defun cider-jack-in-with-profile ()
  (interactive)
  (letrec ((profile (read-string "Enter profile name: "))
           (lein-params (concat "with-profile +" profile " repl :headless")))
    (message "lein-params set to: %s" lein-params)
    (set-variable 'cider-lein-parameters lein-params)
    ;; just a empty parameter
    (cider-jack-in '())))

It is work now.

@jiacai2050
Copy link
Contributor

"eval-region: Wrong number of arguments: (1 . 1), 0"

I'm a little annoyed about this kind of error.
I have been doing Golang stuff for about one year, and return to clojure this week to maintain a cljs project, there are break changes related to cider that I have to dig about, this error is one of them, others are:

While Clojure itself is quite stable, but the tools are not. I really hope maintainers care about compatibility a lot more.
If break changes have to be made, bump major version in SemVer, which it is designed for. Go is good at maintaining compatibility, which I think is one reason to its success.

Cider is awesome, please make it better. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants