calva

2026-02-25T18:06:41.212209Z

Wouldn't it be nice, if Calva would automatically jump to first line with an exception, if I run "Load/evaluate current file" ? From seeing this:

Evaluating file: unsupervised-ml-intro.clj
; 
; Syntax error reading source at (REPL:261:39).
; Metadata can only be applied to IMetas
; Evaluation of file unsupervised-ml-intro.clj failed: class clojure.lang.ExceptionInfo
to "got to line 261" is long, as I cannot click anywhere to jump to the error neither.

2026-02-25T18:07:48.113179Z

Alternative a "jump to last error line" would do it as well, and maybe be more general.

2026-02-25T18:10:11.607059Z

There is "goto line number" in VsCode, but the typing of the number could maybe be avoided with a "Goto last exception"

2026-02-25T18:19:41.595689Z

If I have an error in a macro when loading a clj file with Calva, the "error line is hidden". I see this:

clj꞉unsupervised-ml-intro꞉> 
; Evaluating file: unsupervised-ml-intro.clj
; 
; Execution error at scicloj.metamorph.ml/options->model-def (ml.clj:551).
; Failed to find model :smile.clustering/kmeans.  Is a require missing?
; Evaluation of file unsupervised-ml-intro.clj failed: class clojure.lang.Compiler$CompilerException
Not sure, if there is a way to reliable detect this case and print a bit more of the stacktrace by default ? Does
"failed: class clojure.lang.Compiler$CompilerException
means "macro problem" ? Currently I need to print "*e" to get the line number of the error.
clj꞉unsupervised-ml-intro꞉> *e
#error {
 :cause "Failed to find model :smile.clustering/kmeans.  Is a require missing?"
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message "Syntax error macroexpanding at (unsupervised-ml-intro.clj:484:3)."
   :data #:clojure.error{:phase :execution, :line 484, :column 3, :source "unsupervised-ml-intro.clj"}
   :at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 4227]}

exitsandman 2026-02-25T18:22:24.614969Z

I remember having the same issue, solving it by swapping out the handler in a custom startup script, and eventually realizing that I like putting *e at the end of all comment forms better anyway :)