Skip to content

Commit 2d8ab72

Browse files
committed
Avoid overlays and messages on stderr that is unrelated to exception handling
Fixes #3587
1 parent 60c9cea commit 2d8ab72

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Bugs fixed
66

77
- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop.
8+
- [#3587](https://github.com/clojure-emacs/cider/issues/3587): avoid overlays and `message`s on stderr that is unrelated to exception handling.
89

910
## 1.13.0 (2024-01-14)
1011

Diff for: cider-eval.el

+8-7
Original file line numberDiff line numberDiff line change
@@ -882,13 +882,14 @@ and the suffix matched by `cider-module-info-regexp'."
882882
(defun cider--maybe-display-error-as-overlay (phase err end)
883883
"Possibly display ERR as an overlay honoring END,
884884
depending on the PHASE."
885-
(when (or
886-
;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
887-
(not cider-show-error-buffer)
888-
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
889-
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
890-
(and cider-show-error-buffer
891-
(member phase (cider-clojure-compilation-error-phases))))
885+
(when (and phase ;; if there's no phase, `err' belongs to stderr, unrelated to exception handling (bug #3587)
886+
(or
887+
;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
888+
(not cider-show-error-buffer)
889+
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
890+
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
891+
(and cider-show-error-buffer
892+
(member phase (cider-clojure-compilation-error-phases)))))
892893
;; Display errors as temporary overlays
893894
(let ((cider-result-use-clojure-font-lock nil)
894895
(trimmed-err (funcall cider-inline-error-message-function err)))

0 commit comments

Comments
 (0)