Skip to content

Add command to print the current value of the inspector. #3810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r0man
Copy link
Contributor

@r0man r0man commented Apr 13, 2025

This PR adds the interactive cider-inspector-print-current-value command that prints the current value of the inspector to the cider-inspector-value-buffer with the usual pretty printing machinery.

The NREPL part is here: clojure-emacs/cider-nrepl#933

When pressing "P" in the inspector the currently inspected value is printed in a new popup buffer (on the left side in the picture).

cider-inspect-print-current-value

I see it as the inspectors brother of cider-pprint-eval-last-sexp which I use all the time.

This is the functionality I initially suggested, before working on the pretty mode. I think it is still useful. What I would like to have is a quick way to pretty print the current value of the inspector in the same familiar way my eye is used to, as the Clojure pretty printer (or what we are using in CIDER).

The new pretty mode does print more pretty, but differently, it uses "inspector mode" printing.

That's why I think this could be a useful addition.

Wdyt?


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

This PR adds the interactive `cider-inspector-print-current-value`
command that prints the current value of the inspector to the
`cider-inspector-value-buffer` with the usual pretty printing
machinery.
@r0man r0man force-pushed the inspect-pprint-current-value branch from 6350c4c to 34637f1 Compare April 13, 2025 19:33
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