This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-22
Channels
- # announcements (9)
- # beginners (96)
- # calva (14)
- # cider (49)
- # clj-kondo (29)
- # cljsrn (5)
- # clojure (55)
- # clojure-dev (37)
- # clojure-europe (4)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-spec (5)
- # clojure-switzerland (3)
- # clojure-uk (5)
- # clojurescript (172)
- # cursive (14)
- # datomic (3)
- # duct (1)
- # emacs (6)
- # fulcro (17)
- # jobs (1)
- # leiningen (6)
- # nrepl (11)
- # off-topic (26)
- # pedestal (2)
- # re-frame (20)
- # reagent (9)
- # remote-jobs (3)
- # shadow-cljs (67)
- # spacemacs (24)
- # specter (6)
- # test-check (3)
- # tools-deps (18)
(ns bug-demo (:require [datomic.ion.cast :as cast] [http://clojure.java.io :refer [output-stream]])) (cast/initialize-redirect :stderr) ; instead of :stdout (cast/event {:msg "ShouldNotCauseAStackOverflowErrorInCider"})
I just hit ,history and then use whatever text search I want in the history buffer that pops up
I’m trying to start an embedded nRepl in my app. I’m following the instructions at https://github.com/clojure-emacs/cider-nrepl#via-embedding-nrepl-in-your-app and I’m getting
ERROR: Unhandled REPL handler exception processing message {:ns user, :file *cider-repl griffin/banksy:localhost:4005#2(clj)*, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :op eval, :column 7, :line 45, :id 18, :code (System/getenv), :content-type true, :nrepl.middleware.print/stream? 1, :nrepl.middleware.print/options {:right-margin 70}, :session 2bd54e06-29e1-45c6-9569-a82e782ec11f}
java.lang.NullPointerException
at clojure.core$deref_future.invokeStatic(core.clj:2300)
at clojure.core$deref.invokeStatic(core.clj:2320)
at clojure.core$deref.invoke(core.clj:2306)
at cider.nrepl$wrap_tracker$fn__401.invoke(nrepl.clj:435)
at nrepl.middleware$wrap_conj_descriptor$fn__962.invoke(middleware.clj:16)
at nrepl.middleware.print$wrap_print$fn__1162.invoke(print.clj:234)
at nrepl.middleware$wrap_conj_descriptor$fn__962.invoke(middleware.clj:16)
at cider.nrepl$wrap_info$fn__327.invoke(nrepl.clj:180)
at nrepl.middleware$wrap_conj_descriptor$fn__962.invoke(middleware.clj:16)
at nrepl.middleware.session$session$fn__1355.invoke(session.clj:272)
at nrepl.middleware$wrap_conj_descriptor$fn__962.invoke(middleware.clj:16)
at clojure.lang.Var.invoke(Var.java:384)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
at nrepl.server$handle_STAR_.invoke(server.clj:15)
at nrepl.server$handle$fn__1386.invoke(server.clj:27)
at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
(defn nrepl-handler []
(require 'cider.nrepl)
(ns-resolve 'cider.nrepl 'cider-nrepl-handler))
(nrepl/start-server :port port
:bind host
:handler (nrepl-handler))
Hi there! Cider really rocks! Is there a way to search for a function definition without specifying its namespace or even better with specifying only part of its name?
My bug appears to be AOT related. My nrepl code is in the main namespace, with a :gen-class. If I comment out the :gen-class, the nrepl starts fine
Looks like I had this: https://github.com/clojure-emacs/cider-nrepl/issues/533
@dpsutton Indeed cider-apropos looks awesome! I am in Spacemacs. When I hit enter on a symbol on the cider apropos buffer it displays the doc of the function. How do I get to the source code of the function?
@viebel, the same way as you do it in a code buffer? (I'm just guessing, but it would make sense to me 😄)
@pez @dpsutton In order to get to the code of the function, I have to press TAB and then ENTER. Is there a quicker way to navigate quickly to the source code of a function without typing the fully qualified name of the function?
@viebel this looks reasonably efficient to me. You don't need to type anything imho; it should jump straight into the source code.
The other alternative (which I use) is to just press s
(still assuming you're in the doc buffer where you got after pressing RET
in the cider-apropos
output buffer)
Awesome. I didn’t know about pressing s
in the cider-apropos output buffer. Where is it documented?
@dpsutton No. ?
does nothing
@darioszr cider-jack-in
creates a new CIDER (sesman) session, not a new nREPL session.
A CIDER session is basically a group of connections (REPLs) attached to the same server.
If not stated already. I think I confuse some terms in my question before.. I was duck programming myself
And every CIDER connections opens up two nREPL sessions - one for user commands and one for internal commands.
The second one is needed so the internal commands won’t clobber things like *1
, *e
, etc, which are session-bound in nREPL.
Sessions exist to allow us to multiplex a single connection and do different things over it.
What is the quickest way to navigate quickly to the source code of a function without typing the fully qualified name of the function?
M-.
-- executes cider-find-var
FYI you can find command names via the input keystroke with C-h k
(& yeah, I had to look that up to remember it. I usually try to find commands via regex via C-h a
)

The problem with cider-find-var
is that I have to type the whole name of the var and the var is not on the current ns it is very cumbersome
Hmm, it should autofill to the symbol under the point if working correctly. M-.
then hit enter, instantly goes to source
Exactly, it should work that way. As long as cider recognizes the symbol under the point it shouldn't ask for anything.
@viebel btw. I use g d
(jump-to-definition) in spacemacs - this even works without connected REPL (but it's obviously quite limited in that case)
Guys, this is not what I am asking. I am asking for a way to look for a var by typing its name partially. Let’s say I am in ns foo and I look for var bar/my-func. I would like to be able to type “my-func” or “my-f” and let CIDER take me to a list of symbol that matches “my-f”. Something like cider-apropos that takes me to the definition of the var instead of displaying the doc of the var.