Skip to content

Commit 1ddfcb5

Browse files
carretebbatsov
authored andcommitted
Fix format of clojure-cli options because TRAMP
This is /a/ solution for clojure-emacs/clj-refactor.el#445 (comment). I do not know what the cause of this problem is. Perhaps `IFS` is different between cider-jack-in versus directly on the command-line? Perhaps it's because TRAMP uses `/bin/sh` to run remote commands, not `/bin/bash`? I don't know. Given that `,` is whitespace in clojure, this seems like a harmless patch.
1 parent aaf1f52 commit 1ddfcb5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cider.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ Throws an error if PROJECT-TYPE is unknown."
364364

365365
(defun cider-jack-in-params (project-type)
366366
"Determine the commands params for `cider-jack-in' for the PROJECT-TYPE."
367+
;; The format of these command-line strings must consider different shells,
368+
;; different values of IFS, and the possibility that they'll be run remotely
369+
;; (e.g. with TRAMP). Using `", "` causes problems with TRAMP, for example.
370+
;; Please be careful when changing them.
367371
(pcase project-type
368372
('lein cider-lein-parameters)
369373
('boot cider-boot-parameters)
@@ -373,7 +377,7 @@ Throws an error if PROJECT-TYPE is unknown."
373377
(mapconcat
374378
(apply-partially #'format "\"%s\"")
375379
(cider-jack-in-normalized-nrepl-middlewares)
376-
", ")
380+
",")
377381
"]")))
378382
('shadow-cljs cider-shadow-cljs-parameters)
379383
('gradle cider-gradle-parameters)

0 commit comments

Comments
 (0)