Skip to content

Commit

Permalink
[Fix clojure-emacs#979] Add cider-inspect--popup-buffer for inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
cichli committed Feb 17, 2015
1 parent 060817b commit 56f0490
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ non-functioning `cider-test-jump` from test reports.
* [#954](https://github.com/clojure-emacs/cider/issues/954): Detect properly a project's root
when in buffer that's not visiting a file (e.g. a REPL buffer).
* [#977](https://github.com/clojure-emacs/cider/issues/977): `cider-format-region` now respects indentation of the region start position
* [#979](https://github.com/clojure-emacs/cider/issues/979): Fixed the inspector buffer popping up needlessly.

## 0.8.2 / 2014-12-21

Expand Down
13 changes: 9 additions & 4 deletions cider-inspector.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,30 @@
(cider-emit-into-popup-buffer buffer "Oops"))
'()))

(defun cider-inspector--popup-buffer ()
(if (eq (current-buffer) cider-inspector-buffer)
current-buffer
(cider-popup-buffer cider-inspector-buffer t)))

(defun cider-inspect-sym (sym ns)
(let ((buffer (cider-popup-buffer cider-inspector-buffer t)))
(let ((buffer (cider-inspector--popup-buffer)))
(nrepl-send-request (list "op" "inspect-start" "sym" sym "ns" ns)
(cider-render-response buffer))))

(defun cider-inspector-pop ()
(interactive)
(let ((buffer (cider-popup-buffer cider-inspector-buffer t)))
(let ((buffer (cider-inspector--popup-buffer)))
(nrepl-send-request (list "op" "inspect-pop")
(cider-render-response buffer))))

(defun cider-inspector-push (idx)
(let ((buffer (cider-popup-buffer cider-inspector-buffer t)))
(let ((buffer (cider-inspector--popup-buffer)))
(nrepl-send-request (list "op" "inspect-push" "idx" (number-to-string idx))
(cider-render-response buffer))))

(defun cider-inspector-refresh ()
(interactive)
(let ((buffer (cider-popup-buffer cider-inspector-buffer t)))
(let ((buffer (cider-inspector--popup-buffer)))
(nrepl-send-request (list "op" "inspect-refresh")
(cider-render-response buffer))))

Expand Down

0 comments on commit 56f0490

Please sign in to comment.