Function: cider-repl-describe-startup
cider-repl-describe-startup is an autoloaded, interactive and
byte-compiled function defined in cider-repl.el.
Signature
(cider-repl-describe-startup)
Documentation
Describe how the current REPL was started.
Shows the project, endpoint and REPL type, plus the jack-in command and (for ClojureScript) the init form used to upgrade the REPL - the launch details kept out of the transcript. Offers buttons to copy a command or form to the kill ring (to paste into a shell or the REPL) and to customize the related options.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-repl.el
;;;###autoload
(defun cider-repl-describe-startup ()
"Describe how the current REPL was started.
Shows the project, endpoint and REPL type, plus the jack-in command and (for
ClojureScript) the init form used to upgrade the REPL - the launch details kept
out of the transcript. Offers buttons to copy a command or form to the kill
ring (to paste into a shell or the REPL) and to customize the related options."
(interactive)
(let* ((repl (cider-current-repl 'infer 'ensure))
(params (buffer-local-value 'cider-launch-params repl))
(project (or (plist-get params :project-dir)
(buffer-local-value 'nrepl-project-dir repl)))
(endpoint (buffer-local-value 'nrepl-endpoint repl))
(repl-type (buffer-local-value 'cider-repl-type repl))
(jack-in (plist-get params :jack-in-cmd))
(cljs-type (plist-get params :cljs-repl-type))
(cljs-form (plist-get params :repl-init-form)))
(unless (or project endpoint repl-type jack-in cljs-type cljs-form)
(user-error "No startup details available for this REPL"))
(with-current-buffer (get-buffer-create cider-repl-startup-buffer)
(cider-repl-help-mode)
(let ((inhibit-read-only t))
(erase-buffer)
(insert (propertize "How this REPL started\n\n" 'face 'cider-repl-help-heading))
(when project
(insert (format "Project %s\n" project)))
(when endpoint
(insert (format "Endpoint %s:%s\n"
(plist-get endpoint :host) (plist-get endpoint :port))))
(when repl-type
(insert (format "REPL type %s\n" repl-type)))
(when jack-in
(insert "\n"
(propertize "Jack-in command " 'face 'cider-repl-help-heading)
(cider-repl--help-button
"[copy]"
(lambda () (kill-new jack-in)
(message "Jack-in command copied to the kill ring"))
"Copy the jack-in command to the kill ring (paste it in a shell)")
"\n " jack-in "\n"))
(when (or cljs-type cljs-form)
(insert "\n"
(propertize "ClojureScript REPL " 'face 'cider-repl-help-heading)
(cider-repl--help-button
"[customize]"
(lambda () (customize-variable 'cider-default-cljs-repl))
"Customize cider-default-cljs-repl")
"\n")
(when cljs-type
(insert (format " type: %s\n" cljs-type)))
(when cljs-form
(insert " init form "
(cider-repl--help-button
"[copy]"
(lambda () (kill-new cljs-form)
(message "Init form copied to the kill ring"))
"Copy the init form to the kill ring (paste it at the REPL)")
"\n " cljs-form "\n")))
(goto-char (point-min))))
(pop-to-buffer cider-repl-startup-buffer)))