Function: cider-scratch-set-session

cider-scratch-set-session is an interactive and byte-compiled function defined in cider-scratch.el.

Signature

(cider-scratch-set-session)

Documentation

Attach the current scratch buffer to an explicitly chosen session.

Also renames the buffer to match, so its name keeps reflecting its session.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-scratch.el
(defun cider-scratch-set-session ()
  "Attach the current scratch buffer to an explicitly chosen session.
Also renames the buffer to match, so its name keeps reflecting its session."
  (interactive)
  (if-let* ((repl (cider-scratch--ask-for-repl)))
      (progn
        (cider-scratch--attach repl)
        (rename-buffer
         (cider-scratch--buffer-name
          (sesman-session-name-for-object 'CIDER repl 'no-error))
         'unique))
    (user-error "No CIDER sessions to attach to")))