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

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

[nongnu] elpa/cider 8bb19a9e28 1/3: Introduce `cider-stacktrace-navigate


From: ELPA Syncer
Subject: [nongnu] elpa/cider 8bb19a9e28 1/3: Introduce `cider-stacktrace-navigate-to-other-window` defcustom (#3417)
Date: Sun, 20 Aug 2023 09:58:57 -0400 (EDT)

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

    Introduce `cider-stacktrace-navigate-to-other-window` defcustom (#3417)
---
 CHANGELOG.md                                          |  3 ++-
 cider-stacktrace.el                                   |  8 +++++++-
 doc/modules/ROOT/pages/usage/dealing_with_errors.adoc | 12 ++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 391439c4d8..420dba040e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,7 +34,8 @@
 ### Changes
 
 - [#3390](https://github.com/clojure-emacs/cider/issues/3390): Enhance 
`cider-connect` to show all nREPLs available ports, instead of only Leiningen 
ones.
-- [#3408](https://github.com/clojure-emacs/cider/issues/3408): 
`cider-connect`: check `.nrepl-port`-like files for liveness, hiding them if 
they don't reflect an active port. 
+- [#3408](https://github.com/clojure-emacs/cider/issues/3408): 
`cider-connect`: check `.nrepl-port`-like files for liveness, hiding them if 
they don't reflect an active port.
+- Introduce `cider-stacktrace-navigate-to-other-window` defcustom.
 - Preserve the `:cljs-repl-type` more reliably.
 - Improve the presentation of `xref` data.
 - `cider-test`: only show diffs for collections.
diff --git a/cider-stacktrace.el b/cider-stacktrace.el
index 75db9c159c..2838272f17 100644
--- a/cider-stacktrace.el
+++ b/cider-stacktrace.el
@@ -56,6 +56,12 @@ If nil, messages will not be wrapped.  If truthy but 
non-numeric,
   :type 'list
   :package-version '(cider . "0.6.0"))
 
+(defcustom cider-stacktrace-navigate-to-other-window t
+  "If truthy, navigating from a stack frame will use other window.
+Pick nil if you prefer the same window as *cider-error*."
+  :type 'boolean
+  :package-version '(cider . "1.8.0"))
+
 (make-obsolete 'cider-stacktrace-print-length 'cider-stacktrace-print-options 
"0.20")
 (make-obsolete 'cider-stacktrace-print-level 'cider-stacktrace-print-options 
"0.20")
 (make-obsolete-variable 'cider-stacktrace-print-options 'cider-print-options 
"0.21")
@@ -547,7 +553,7 @@ Achieved by destructively manipulating 
`cider-stacktrace-suppressed-errors'."
                 (button-get button 'file)))
          ;; give priority to `info` files as `info` returns full paths.
          (info (nrepl-dict-put info "file" file)))
-    (cider--jump-to-loc-from-info info t)
+    (cider--jump-to-loc-from-info info 
cider-stacktrace-navigate-to-other-window)
     (forward-line line-shift)
     (back-to-indentation)))
 
diff --git a/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc 
b/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
index 24e4873403..b448543a40 100644
--- a/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
+++ b/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
@@ -58,6 +58,18 @@ To disable auto-selection of the error buffer when it's 
displayed:
 (setq cider-auto-select-error-buffer nil)
 ----
 
+By default, when you jump to the source of a given stack frame,
+an Emacs window other than that of `*cider-error*` will be chosen.
+If you wish to reuse `*cider-error*`'s window instead, please configure:
+
+[source,lisp]
+----
+(setq cider-stacktrace-navigate-to-other-window nil)
+----
+
+If you have customized this setting, when you have navigated to a given source 
file,
+you can navigate back to `*cider-error*` with `Ctrl-X <left>` or `M-x 
xref-pop-marker-stack`.
+
 == Navigating Stacktraces
 
 CIDER comes with a powerful solution for dealing with Clojure



reply via email to

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