Skip to content

Commit

Permalink
Avoid overlays and messages on stderr that is unrelated to exceptio…
Browse files Browse the repository at this point in the history
…n handling

Fixes #3587
  • Loading branch information
vemv committed Jan 21, 2024
1 parent f7f8e2c commit b260496
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bugs fixed

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

## 1.13.0 (2024-01-14)

Expand Down
15 changes: 8 additions & 7 deletions cider-eval.el
Original file line number Diff line number Diff line change
Expand Up @@ -883,13 +883,14 @@ and the suffix matched by `cider-module-info-regexp'."
(defun cider--maybe-display-error-as-overlay (phase err end)
"Possibly display ERR as an overlay honoring END,
depending on the PHASE."
(when (or
;; 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:
(not cider-show-error-buffer)
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
(and cider-show-error-buffer
(member phase (cider-clojure-compilation-error-phases))))
(when (and phase ;; if there's no phase, `err' belongs to stderr, unrelated to exception handling (bug #3587)
(or
;; 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:
(not cider-show-error-buffer)
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
(and cider-show-error-buffer
(member phase (cider-clojure-compilation-error-phases)))))
;; Display errors as temporary overlays
(let ((cider-result-use-clojure-font-lock nil)
(trimmed-err (funcall cider-inline-error-message-function err)))
Expand Down

0 comments on commit b260496

Please sign in to comment.