# Changelog

## master (unreleased)

### New features

- [#3645](https://github.com/clojure-emacs/cider/issues/3645): Show a spinner in the mode line while tests are running.
- [#3865](https://github.com/clojure-emacs/cider/pull/3865): Add default session feature to bypass sesman's project-based dispatch (`cider-set-default-session`, `cider-clear-default-session`).
- Introduce `cider-jack-in-tools` and `cider-register-jack-in-tool` so third-party packages can register new project tools for `cider-jack-in` and `cider-jack-in-universal`.
- Cache the result of `cider--running-nrepl-paths` (used by `cider-locate-running-nrepl-ports`) for `cider-running-nrepl-paths-cache-ttl` seconds (default 5). Repeated `cider-connect` completions no longer re-spawn a fresh round of `ps`/`lsof` subprocesses each time. `cider-clear-running-nrepl-paths-cache` discards the cache on demand.
- New `nrepl-make-eval-handler` with a keyword-arg API:
  - Keyword slots: `:on-value`, `:on-stdout`, `:on-stderr`, `:on-done`, `:on-eval-error`, `:on-content-type`, `:on-truncated`.
  - Sub-handlers no longer take a buffer argument; they close over whatever they need.
  - `nrepl-make-response-handler`, the legacy 7-positional-arg form, is preserved as an obsolete shim that adapts the old `(buffer x)` lambdas to the new `(x)` lambdas, so existing extensions keep working.
- New `cider-repl-history-doctor` command: walks `cider-repl-input-history` looking for entries whose parens don't balance under Clojure syntax, shows each in a side buffer, and asks whether to delete it.  When done, rewrites `cider-repl-history-file` if one is configured.  Useful for cleaning up history after a typo got committed that breaks `cider-repl-history` rendering (see [#3915](https://github.com/clojure-emacs/cider/issues/3915)).
- Recognize [let-go](https://github.com/nooga/let-go) (a Clojure dialect implemented in Go) as a known nREPL runtime.  `cider-runtime` returns `let-go` for these connections and the connection info line shows the runtime version, e.g. `CLJ project@localhost:2137 (let-go 1.0)`.
- Decouple the nREPL transport layer from CIDER's UI layer (closes [#1099](https://github.com/clojure-emacs/cider/issues/1099)):
  - `nrepl-make-eval-handler` is now CIDER-agnostic. It no longer references `nrepl-namespace-handler-function`, `nrepl-err-handler-function`, `nrepl-need-input-handler-function`, or any hardcoded UI strings.
  - New `:on-ns` and `:on-status` keyword slots let any consumer wire up their own namespace tracking and status handling.
  - The editor-level `cider-make-eval-handler` wraps it with CIDER's UI behavior (ns tracking, default error handler, need-input prompt, "Evaluation interrupted." / "Namespace not found." messages). In-tree callers all use it.
- New nREPL message log commands: `nrepl-show-messages` pops up the messages buffer (prompting when there are multiple connections), and `c` in `nrepl-messages-mode` runs the new `nrepl-clear-messages` to wipe the buffer. Auto-follow on new entries now leaves windows alone if you've scrolled back to read history; only windows already at end-of-buffer get scrolled to the latest message.

### New features

- `cider-eval-commands-map` (`C-c C-v` prefix) now binds five eval commands that previously had no entry under the prefix:
  - `cider-eval-last-sexp-to-repl` (`j`/`C-j`)
  - `cider-eval-print-last-sexp` (`p`/`C-p`)
  - `cider-read-and-eval` (`:`)
  - `cider-eval-defun-to-comment` (`;`)
  - `cider-pprint-eval-last-sexp-to-repl` (`f j e`)

### Bugs fixed

- `cider-browse-spec-mode`, `cider-browse-spec-view-mode`, and `cider-browse-spec-example-mode` each have an `easy-menu` now, exposing the drill/browse-all/generate-example commands that previously had no menu affordance.
- `cider-repl-history-mode` now has an `easy-menu` ("REPL History") covering insert, navigation, search/filter, refresh/delete/undo, and quit.
- `cider-log-mode` now has an `easy-menu` ("CIDER Log") covering event inspect/print, navigation, and the framework/appender/consumer/event management commands previously only reachable via the `C-c M-l` prefix.
...
...
