emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider d7c7d99454 2/3: Avoid overlays and `message`s on std


From: ELPA Syncer
Subject: [nongnu] elpa/cider d7c7d99454 2/3: Avoid overlays and `message`s on stderr that is unrelated to exception handling
Date: Thu, 1 Feb 2024 13:00:03 -0500 (EST)

branch: elpa/cider
commit d7c7d994548efff6e32e664236ed79158d8d9a09
Author: vemv <vemv@users.noreply.github.com>
Commit: vemv <vemv@users.noreply.github.com>

    Avoid overlays and `message`s on stderr that is unrelated to exception 
handling
    
    Fixes #3587
---
 CHANGELOG.md  |  1 +
 cider-eval.el | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 283fe107e0..b62dad31b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 
 - [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid 
`cider--error-phase-of-last-exception` recursive loop.  
 - [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt 
`cider-completion-context.el` to upstream changes in Compliment.  
+- [#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)
 
diff --git a/cider-eval.el b/cider-eval.el
index 391f778b9e..3dcaeef722 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -913,13 +913,16 @@ 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 (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))))
+             ;; Only show overlays for things that do look like an exception 
(#3587):
+             (or (string-match-p cider-clojure-runtime-error-regexp err)
+                 (string-match-p cider-clojure-compilation-regexp err)))
     ;; Display errors as temporary overlays
     (let ((cider-result-use-clojure-font-lock nil)
           (trimmed-err (funcall cider-inline-error-message-function err)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]