Skip to content

Honor content types for interactive evaluations#4071

Merged
bbatsov merged 1 commit into
masterfrom
rich-interactive-evals
Jul 3, 2026
Merged

Honor content types for interactive evaluations#4071
bbatsov merged 1 commit into
masterfrom
rich-interactive-evals

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 3, 2026

Copy link
Copy Markdown
Member

Second round of the rich-content revival, closing the gap plexus reported back in 2018 (#2476): content types were only requested for forms entered at the REPL prompt, so C-x C-e on an image-returning form just printed the object.

Interactive evals now opt in to content-typed responses, and the new cider-eval-rich-content-destination controls where rich results render:

  • inline (default): images render right in the result overlay at point, like a regular eval result (and vanish the same way); non-renderable content falls back to its plain-text form.
  • repl: exactly like rich results at the REPL prompt, [show content] buttons included.
  • popup: the *cider-result* buffer, with fetch buttons for external references.
  • nil: previous behavior.

Handlers without an :on-content-type slot (eval-to-comment, pprint flows, third-party callbacks) are unaffected - the server keeps sending the plain value alongside.

Rich results were REPL-prompt-only since 2018 (#2476): evaluating a
form returning an image from a source buffer just printed the object.
Interactive evals now opt in to content-typed responses, and the new
cider-eval-rich-content-destination controls where rich results render:
inline in the result overlay (the default), in the REPL (reusing its
content-type handlers, buttons included), in the *cider-result* popup,
or nil for the old plain-value behavior.
@bbatsov bbatsov merged commit 2b58bda into master Jul 3, 2026
12 checks passed
@bbatsov bbatsov deleted the rich-interactive-evals branch July 3, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant