Skip to content

Commit ddbe540

Browse files
malltbbatsov
authored andcommitted
[Fix #2909] Add option to control auto selection of the inspector buffer
1 parent fd4df89 commit ddbe540

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## master (unreleased)
44

5+
### New features
6+
7+
* [#2909](https://github.com/clojure-emacs/cider/issues/2909): Add new customization variable `cider-inspector-auto-select-buffer` to control the auto selection of the inspector buffer.
8+
59
### Bugs fixed
610

711
* Fix broken links to the docs in REPL warnings (the REPL links included the full CIDER version, but the docs URLs are without the patch version).

cider-inspector.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ by clicking or navigating to them by other means."
6767
:group 'cider-inspector
6868
:package-version '(cider . "0.25.0"))
6969

70+
(defcustom cider-inspector-auto-select-buffer t
71+
"Determines if the inspector buffer should be auto selected."
72+
:type 'boolean
73+
:group 'cider-inspector
74+
:package-version '(cider . "0.27.0"))
75+
7076
(defvar cider-inspector-uninteresting-regexp
7177
(concat "nil" ; nils are not interesting
7278
"\\|:" clojure--sym-regexp ; nor keywords
@@ -307,7 +313,7 @@ Set the page size in paginated view to PAGE-SIZE."
307313
"Render VALUE."
308314
(cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 'ancillary)
309315
(cider-inspector-render cider-inspector-buffer value)
310-
(cider-popup-buffer-display cider-inspector-buffer t)
316+
(cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer)
311317
(when cider-inspector-fill-frame (delete-other-windows))
312318
(with-current-buffer cider-inspector-buffer
313319
(when (eq cider-inspector-last-command 'cider-inspector-pop)

doc/modules/ROOT/pages/debugging/inspector.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@ You'll have access to additional keybindings in the inspector buffer
5353
| Defines a var in the REPL namespace with current inspector value
5454
|===
5555

56+
== Configuration
5657

5758
By default, navigation skips over values like nils, numbers and
5859
keywords, which are not interesting to inspect. You can control this
5960
behavior using the variable `cider-inspector-skip-uninteresting`.
6061

62+
The inspector buffer is automatically selected by default. You
63+
can disable the auto selection with the variable
64+
`cider-inspector-auto-select-buffer`.
65+
6166
== Additional Resources
6267

6368
* https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html[Using CIDER's Inspector in Spacemacs]

0 commit comments

Comments
 (0)