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

Pass cider-default-cljs-repl value to server's on-port-callback #2338

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

vspinu
Copy link
Contributor

@vspinu vspinu commented Jun 18, 2018

Fixes #2336

(cider--jack-in do-prompt
(lambda (server-buffer)
(cider-connect-sibling-cljs server-buffer)))))
(let ((cider-default-cljs-repl cljs-repl-type))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of dynamic binding, as it makes the code harder to read. Maybe we should pass this as a param?

Copy link
Contributor Author

@vspinu vspinu Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do it anyhow. cider-connect-siblings-cljs accepts other-repl as first and the only argument. This is useless for interactive use. So I would say we make two argument with the first one being cljs-repl-type (or maybe more generic params) which would ask on C-u for repl type. Then even with dir-local default-cljs-repl set one can spark a different repl type with C-u C-c M-s.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -944,8 +948,7 @@ Figwheel, etc), unless you've set `cider-default-cljs-repl'. OTHER-REPL
can also be a server buffer, in which case a new session with a REPL for
that server is created."
(interactive (list (cider-current-repl)))
(let ((cljs-repl-type (or cider-default-cljs-repl
(cider-select-cljs-repl)))
(let ((cljs-repl-type (or cider-default-cljs-repl (cider-select-cljs-repl)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can obtain this differently here.

@bbatsov bbatsov merged commit f05dbc4 into clojure-emacs:master Jun 19, 2018
@vspinu vspinu deleted the conn-api.cljs-repl branch June 20, 2018 10:37
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

Successfully merging this pull request may close these issues.

2 participants