Function: cider-apropos-request
cider-apropos-request is a byte-compiled function defined in
cider-client.el.
Signature
(cider-apropos-request QUERY &key SEARCH-NS DOCS-P PRIVATES-P CASE-SENSITIVE-P)
Documentation
Send "apropos" request for regexp QUERY.
Optional arguments include SEARCH-NS, DOCS-P, PRIVATES-P, CASE-SENSITIVE-P.
This is the keyword-argument form; cider-sync-request:apropos is the legacy positional shim retained for backward compatibility.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260807.1133/cider-client.el
(cl-defun cider-apropos-request (query &key search-ns docs-p privates-p case-sensitive-p)
"Send \"apropos\" request for regexp QUERY.
Optional arguments include SEARCH-NS, DOCS-P, PRIVATES-P, CASE-SENSITIVE-P.
This is the keyword-argument form; `cider-sync-request:apropos' is the legacy
positional shim retained for backward compatibility."
;; Apropos resolves symbols against the JVM Clojure runtime (orchard has no
;; ClojureScript branch), so it returns misleading results in a cljs context.
;; Guard on `cider-connected-p' so a disconnected session still gets the
;; regular "no REPL" error rather than this one.
(when (and (cider-connected-p) (not (cider-runtime-clojure-p)))
(user-error "Apropos is only supported for Clojure, not ClojureScript"))
(let* ((query (replace-regexp-in-string "[ \t]+" ".+" query))
(response (cider-nrepl-sync-request
`("op" "cider/apropos"
"ns" ,(cider-current-ns)
"query" ,query
,@(when search-ns `("search-ns" ,search-ns))
,@(when docs-p '("docs?" "t"))
,@(when privates-p '("privates?" "t"))
,@(when case-sensitive-p '("case-sensitive?" "t"))
"exclude-regexps" ,cider-filtered-namespaces-regexps))))
(if (member "apropos-regexp-error" (nrepl-dict-get response "status"))
(user-error "Invalid regexp: %s" (nrepl-dict-get response "error-msg"))
(nrepl-dict-get response "apropos-matches"))))