; CIDER 0.9.1snapshot (package: 20150618.2308) (Java 1.8.0_45, Clojure 1.6.0, nREPL 0.2.10)
Run (cider-doc) in .clj. Enter println for symbol to lookup. Response:
Debugger entered--Lisp error: (error "Symbol println not resolved")
signal(error ("Symbol println not resolved"))
error("Symbol %s not resolved" "println")
cider-doc-lookup("println")
cider-read-symbol-name("Doc for: " cider-doc-lookup)
cider-doc()
eval((cider-doc) nil)
eval-expression((cider-doc) nil)
#<subr call-interactively>(eval-expression nil nil)
ad-Advice-call-interactively(#<subr call-interactively> eval-expression nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
Doing the same in the REPL works as expected.
(cider-grimoire) also fails in .clj and succeeds in the REPL, but without a helpful error message--just a symbol not resolved.
Have you evaluated the code in the clj buffer first? (using C-c C-k)
Works as expected after C-c C-k. Why is this necessary for those
functions to work correctly? Should this be spelled out more clearly in the
documentation?
On Mon, Jun 22, 2015 at 11:02 AM, Bozhidar Batsov [email protected]
wrote:
Have you evaluated the code in the clj buffer first? (using C-c C-k)
—
Reply to this email directly or view it on GitHub
https://github.com/clojure-emacs/cider/issues/1158#issuecomment-114142352
.
Because the symbols are resolved dynamically in the namespace of the current file using the current REPL process. If the namespace doesn't exist (or the vars don't exist) we can't really resolve anything.
Got it. Would you accept a patch clarifying this in the readme?
On Mon, Jun 22, 2015 at 11:12 AM, Bozhidar Batsov [email protected]
wrote:
Because the symbols are resolved dynamically in the namespace of the
current file using the current REPL process. If the namespace doesn't exist
(or the vars don't exist) we can't really resolve anything.—
Reply to this email directly or view it on GitHub
https://github.com/clojure-emacs/cider/issues/1158#issuecomment-114147125
.
I'm fine with having more docs. Let's hope someone will actually read it as well. :-)
I have this problem even when evaling the whole buffer. Things work fine in the default namespace, but not in others.
Most helpful comment
Got it. Would you accept a patch clarifying this in the readme?
On Mon, Jun 22, 2015 at 11:12 AM, Bozhidar Batsov [email protected]
wrote: