Skip to content

Commit 8a4405c

Browse files
alexander-yakushevbbatsov
authored andcommitted
[eval] Fix broken stacktrace response when C-c C-p throws an exception
1 parent ff44b5b commit 8a4405c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Bugs fixed
1010

1111
- [#3832](https://github.com/clojure-emacs/cider/issues/3832): Fix nrepl--eval-request sending duplicate info.
12+
- [#3837](https://github.com/clojure-emacs/cider/issues/3837): Fix broken stacktrace response when C-c C-p throws an exception.
1213

1314
## 1.19.0 (2025-07-10)
1415

cider-eval.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,10 +884,10 @@ COMMENT-POSTFIX is the text to output after the last line."
884884
(lambda (_buffer warning)
885885
(setq res (concat res warning))))))
886886

887-
(defun cider-popup-eval-handler (&optional buffer _bounds _source-buffer)
887+
(defun cider-popup-eval-handler (&optional buffer _bounds source-buffer)
888888
"Make a handler for printing evaluation results in popup BUFFER,
889889
_BOUNDS representing the buffer bounds of the evaled input,
890-
and _SOURCE-BUFFER the original buffer
890+
and SOURCE-BUFFER the original buffer
891891
892892
This is used by pretty-printing commands."
893893
;; NOTE: cider-eval-register behavior is not implemented here for performance reasons.
@@ -907,15 +907,15 @@ This is used by pretty-printing commands."
907907
;; done handler:
908908
nil
909909
;; eval-error handler:
910-
(lambda (buffer)
910+
(lambda (_buffer)
911911
(when (and (buffer-live-p chosen-buffer)
912912
(member (buffer-name chosen-buffer)
913913
cider-ancillary-buffers))
914914
(with-selected-window (get-buffer-window chosen-buffer)
915915
(cider-popup-buffer-quit-function t)))
916916
;; also call the default nrepl-err-handler, so that our custom behavior doesn't void the base behavior:
917917
(when nrepl-err-handler
918-
(funcall nrepl-err-handler buffer)))
918+
(funcall nrepl-err-handler source-buffer)))
919919
;; content type handler:
920920
nil
921921
;; truncated handler:

0 commit comments

Comments
 (0)