Function: cider-sync-request:ns-path
cider-sync-request:ns-path is a byte-compiled function defined in
cider-client.el.
Signature
(cider-sync-request:ns-path NS &optional FAVOR-URL)
Documentation
Get the path to the file containing NS, FAVOR-URL if specified.
FAVOR-URL ensures a Java URL is returned.
* This always is the case if the underlying runtime is JVM Clojure.
* For ClojureScript, the default is a resource name.
* This often cannot be open by cider-find-file
(unless there was already a buffer opening that file)
Generally, you always want to FAVOR-URL. The option is kept for backwards compatibility.
Note that even when favoring a url, the url itself might be nil, in which case we'll fall back to the resource name.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-client.el
(defun cider-sync-request:ns-path (ns &optional favor-url)
"Get the path to the file containing NS, FAVOR-URL if specified.
FAVOR-URL ensures a Java URL is returned.
* This always is the case if the underlying runtime is JVM Clojure.
* For ClojureScript, the default is a resource name.
* This often cannot be open by `cider-find-file'
(unless there was already a buffer opening that file)
Generally, you always want to FAVOR-URL.
The option is kept for backwards compatibility.
Note that even when favoring a url, the url itself might be nil,
in which case we'll fall back to the resource name."
(unless ns
(error "No ns provided"))
(let ((response (cider-nrepl-send-sync-request `("op" "ns-path"
"ns" ,ns))))
(nrepl-dbind-response response (path url)
(if (and favor-url url)
url
path))))