Function: cider-stacktrace-navigate

cider-stacktrace-navigate is a byte-compiled function defined in cider-stacktrace.el.

Signature

(cider-stacktrace-navigate BUTTON)

Documentation

Navigate to the stack frame source represented by the BUTTON.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-stacktrace.el
(defun cider-stacktrace-navigate (button)
  "Navigate to the stack frame source represented by the BUTTON."
  (let* ((var (button-get button 'var))
         (class (button-get button 'class))
         (method (button-get button 'method))
         (info (or (and var (cider-var-info var))
                   (and class method (cider-member-info class method))
                   (nrepl-dict)))
         ;; Stacktrace returns more accurate line numbers, but if the function's
         ;; line was unreliable, then so is the stacktrace by the same amount.
         ;; Set `line-shift' to the number of lines from the beginning of defn.
         (line-shift (- (or (button-get button 'line) 0)
                        (or (nrepl-dict-get info "line") 1)))
         (file (or
                (nrepl-dict-get info "file")
                (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 cider-stacktrace-navigate-to-other-window)
    (forward-line line-shift)
    (back-to-indentation)))