This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
The error message when running C-c C-k
is a bit confusing. The name in the menu bar states “Load this buffer”, but if you use cider-scratch buffer, an error occurs because the scratch buffer is not associated with a file. Does that mean C-c C-k
is restricted to files? If so, would it be possible to rename the menu item to e.g. “Load this file”
I think I know what it is
However please state the problem in a clearer way, e.g. refer the function by name (a few of us don't use C-
), copy the exact error message you see, etc
cider-load-buffer
is the function and the error message is
cider-load-buffer: Buffer '*cider-scratch*' is not associated with a file
Ok, at first I thought it was a sesman issue, but that's not it
this helper essentially calls the nrepl "load-file"
op. Its doc is:
:doc "Loads a body of code, using supplied path and filename info to set source file and line number metadata. Delegates to underlying \"eval\" middleware/handler."
:requires {"file" "Full contents of a file of code."}
:optional (merge caught/wrap-caught-optional-arguments
print/wrap-print-optional-arguments
{"file-path" "Source-path-relative path of the source file, e.g. clojure/java/io.clj"
"file-name" "Name of source file, e.g. io.clj"})
So, the filename is indeed optional, and cider.el probably was too rigid there