Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

### Bugs fixed

- Fix `cider-log-kill-appender`'s confirmation message, which had the appender and framework names swapped.
- [#4066](https://github.com/clojure-emacs/cider/pull/4066): Jump to the actual source when clicking a stack frame for a top-level anonymous function (the `deftest` shape), instead of landing in `clojure.core/fn` ([#3157](https://github.com/clojure-emacs/cider/issues/3157)).
- [#4058](https://github.com/clojure-emacs/cider/pull/4058): Signal a helpful error when `cider-javadoc` gets an unresolvable (non-absolute) Javadoc URL from the middleware, instead of silently doing nothing ([#2969](https://github.com/clojure-emacs/cider/issues/2969)).
- [#4054](https://github.com/clojure-emacs/cider/pull/4054): Interrupt every REPL an evaluation is dispatched to. In a `.cljc` buffer `cider-interrupt` previously interrupted only one of the two REPLs ([#4036](https://github.com/clojure-emacs/cider/issues/4036)).
Expand All @@ -64,6 +65,7 @@

- Bump the injected `cider-nrepl` to 0.62.0-alpha2, which carries the hardened content-type/slurp middleware backing the rich-content revival below (and no longer double-sends `value` alongside content-typed responses).
- Enable rich content in the REPL by default (`cider-repl-use-content-types` is now t): image results render inline, and results naming external content (files, URLs) render a `[show content]` button that fetches and renders it on demand. The automatic fetching that got the feature disabled back in 0.25 ([#2825](https://github.com/clojure-emacs/cider/issues/2825)) is gone - nothing is transferred until the button is pressed - and the server side is hardened in `cider-nrepl` 0.62 (URL-scheme allowlist, size caps, graceful fetch errors).
- Rename `cider-log-buffer-clear-p` to `cider-log-buffer-has-content-p` - the old name read as the opposite of its behavior; it remains as an obsolete alias.
- Bump the default `cider-repl-history-size` from 500 to 5000.
- Rename the REPL history browser from `cider-repl-history` to `cider-history` (command, mode and options), so its names no longer clash with the REPL's unrelated input-history settings (`cider-repl-history-file`, `cider-repl-history-size`); the old names keep working as obsolete aliases.
- Color the nREPL messages buffer with theme-aware faces (`nrepl-message-faces`, eight faces inheriting from standard font-lock faces) instead of a hardcoded color list; `nrepl-message-colors` is now obsolete, but still takes precedence when customized.
Expand Down
13 changes: 7 additions & 6 deletions lisp/cider-log.el
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ It will not be used if the package hasn't been installed."
"Return S with a bold face."
(when s (propertize (format "%s" s) 'face 'bold)))

(defun cider-log-buffer-clear-p (&optional buffer)
(defun cider-log-buffer-has-content-p (&optional buffer)
"Return non-nil if BUFFER is not empty, otherwise nil."
(when-let* ((buffer (get-buffer (or buffer cider-log-buffer))))
(> (buffer-size buffer) 0)))
(define-obsolete-function-alias 'cider-log-buffer-clear-p 'cider-log-buffer-has-content-p "2.0.0")

(defun cider-log--description-clear-events-buffer ()
"Return the description for the clear-events-buffer action."
Expand Down Expand Up @@ -221,7 +222,7 @@ It will not be used if the package hasn't been installed."
(cider-nrepl-send-request callback)))

(defun cider-sync-request:log-update-consumer (framework appender consumer)
"Add CONSUMER to the APPENDER of FRAMEWORK and call CALLBACK on log events."
"Update CONSUMER of the APPENDER of FRAMEWORK."
(thread-first `("op" "cider/log-update-consumer"
"framework" ,(cider-log-framework-id framework)
"appender" ,(cider-log-appender-id appender)
Expand Down Expand Up @@ -769,7 +770,7 @@ The KEYS are used to lookup the values and are joined by SEPARATOR."
consumer))

(defun cider-log--event-options ()
"Return the current log consumer."
"Return the filter and pagination options for a log event search."
(nrepl-dict "filters" (cider-log--filters)
"limit" cider-log-pagination-limit
"offset" cider-log-pagination-offset))
Expand Down Expand Up @@ -1086,8 +1087,8 @@ the CIDER Inspector and the CIDER stacktrace mode.
(cider-sync-request:log-remove-appender framework appender)
(setq-local cider-log-consumer nil)
(message "Log appender %s removed from the %s framework."
(cider-log-framework-display-name framework)
(cider-log-appender-display-name appender)))
(cider-log-appender-display-name appender)
(cider-log-framework-display-name framework)))

(transient-define-suffix cider-log--do-add-appender (framework appender)
"Add the APPENDER to the log FRAMEWORK."
Expand Down Expand Up @@ -1173,7 +1174,7 @@ You can jump to functions and methods directly from the printed stacktrace now."
(transient-define-suffix cider-log-clear-event-buffer (buffer)
"Clear the Cider log events in BUFFER."
:description #'cider-log--description-clear-events-buffer
:inapt-if-not #'cider-log-buffer-clear-p
:inapt-if-not #'cider-log-buffer-has-content-p
(interactive (list cider-log-buffer))
(when (get-buffer buffer)
(with-current-buffer buffer
Expand Down
Loading
Loading