Function: cider-scratch

cider-scratch is an autoloaded, interactive and byte-compiled function defined in cider-scratch.el.

Signature

(cider-scratch &optional ASK)

Documentation

Go to the scratch buffer attached to the current session.

Each session gets its own scratch buffer, permanently attached to it, so evaluations always target a known session. When the current context has no clear session (or when ASK is non-nil - interactively, a prefix argument), prompt for one. With no connections at all, fall back to a single session-less scratch buffer.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-scratch.el
;;;###autoload
(defun cider-scratch (&optional ask)
  "Go to the scratch buffer attached to the current session.
Each session gets its own scratch buffer, permanently attached to it, so
evaluations always target a known session.  When the current context has
no clear session (or when ASK is non-nil - interactively, a prefix
argument), prompt for one.  With no connections at all, fall back to a
single session-less scratch buffer."
  (interactive "P")
  (let ((repl (or (and (not ask) (cider-current-repl))
                  (cider-scratch--ask-for-repl))))
    (pop-to-buffer (cider-scratch-find-or-create-buffer repl))))