@@ -209,7 +209,9 @@ The error types are represented as strings."
209
209
(setq-local electric-indent-chars nil )
210
210
(setq-local cider-stacktrace-hidden-frame-count 0 )
211
211
(setq-local cider-stacktrace-filters cider-stacktrace-default-filters)
212
- (setq-local cider-stacktrace-cause-visibility (make-vector 10 0 ))
212
+ ; ; Expand all exception causes to "detail level 1" by default, meaning they
213
+ ; ; will show the message and the data (but not the stacktrace).
214
+ (setq-local cider-stacktrace-cause-visibility (make-vector 10 1 ))
213
215
(buffer-disable-undo ))
214
216
215
217
@@ -707,8 +709,7 @@ This associates text properties to enable filtering and source navigation."
707
709
(put-text-property p1 p4 'font-lock-face 'cider-stacktrace-ns-face )
708
710
(put-text-property p2 p3 'font-lock-face 'cider-stacktrace-fn-face )
709
711
(put-text-property (line-beginning-position ) (line-end-position )
710
- 'cider-stacktrace-frame t )))
711
- (insert " \n " )))))))
712
+ 'cider-stacktrace-frame t )))))))))
712
713
713
714
(defun cider-stacktrace-render-compile-error (buffer cause )
714
715
" Emit into BUFFER the compile error CAUSE, and enable jumping to it."
@@ -844,41 +845,38 @@ make INSPECT-INDEX actionable if present."
844
845
, cider-stacktrace-exception-map )
845
846
(insert (format " %d . " num)
846
847
(propertize note 'font-lock-face 'font-lock-comment-face ) " "
847
- (propertize class 'font-lock-face class-face 'mouse-face 'highlight )
848
- " \n " ))
848
+ (propertize class 'font-lock-face class-face 'mouse-face 'highlight )))
849
849
; ; Detail level 1: message + ex-data
850
850
(cider-propertize-region '(detail 1 )
851
+ (insert " \n " )
851
852
(if (equal class " clojure.lang.Compiler$CompilerException" )
852
853
(cider-stacktrace-render-compile-error buffer cause)
853
854
(cider-stacktrace-emit-indented
854
855
(propertize (or message " (No message)" )
855
856
'font-lock-face message-face)
856
857
indent t ))
857
- (insert " \n " )
858
858
(when spec
859
+ (insert " \n " )
859
860
(cider-stacktrace--emit-spec-problems spec (concat indent " " )))
860
861
(when data
862
+ (insert " \n " )
861
863
(cider-stacktrace-emit-indented data indent nil t )))
862
864
; ; Detail level 2: stacktrace
863
865
(cider-propertize-region '(detail 2 )
864
- (insert " \n " )
865
866
(let ((beg (point ))
866
867
(bg `(:background , cider-stacktrace-frames-background-color :extend t )))
867
868
(dolist (frame stacktrace)
869
+ (insert " \n " )
868
870
(cider-stacktrace-render-frame buffer frame))
869
871
(overlay-put (make-overlay beg (point )) 'font-lock-face bg)))
870
872
; ; Add line break between causes, even when collapsed.
871
873
(cider-propertize-region '(detail 0 )
872
- (insert " \n " )))))))
874
+ (insert " \n\n " )))))))
873
875
874
876
(defun cider-stacktrace-initialize (causes )
875
877
" Set and apply CAUSES initial visibility, filters, and cursor position."
876
878
(nrepl-dbind-response (car causes) (class)
877
879
(let ((compile-error-p (equal class " clojure.lang.Compiler$CompilerException" )))
878
- ; ; Partially display outermost cause if it's a compiler exception (the
879
- ; ; description reports reader location of the error).
880
- (when compile-error-p
881
- (cider-stacktrace-cycle-cause (length causes) 1 ))
882
880
; ; Fully display innermost cause. This also applies visibility/filters.
883
881
(cider-stacktrace-cycle-cause 1 cider-stacktrace-detail-max)
884
882
; ; Move point (DWIM) to the compile error location if present, or to the
0 commit comments