This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-29
Channels
- # architecture (2)
- # bangalore-clj (2)
- # beginners (177)
- # boot (1)
- # cider (36)
- # clara (15)
- # cljs-dev (30)
- # cljs-experience (6)
- # cljsrn (7)
- # clojure (94)
- # clojure-argentina (2)
- # clojure-brasil (1)
- # clojure-dusseldorf (6)
- # clojure-greece (1)
- # clojure-italy (18)
- # clojure-norway (4)
- # clojure-quebec (1)
- # clojure-russia (28)
- # clojure-sg (3)
- # clojure-spec (12)
- # clojure-turkiye (1)
- # clojure-uk (12)
- # clojurescript (169)
- # code-reviews (4)
- # community-development (2)
- # core-async (6)
- # core-matrix (6)
- # cursive (35)
- # datomic (18)
- # devcards (4)
- # euroclojure (1)
- # hoplon (2)
- # keechma (4)
- # klipse (2)
- # leiningen (1)
- # luminus (16)
- # mount (1)
- # off-topic (34)
- # om (31)
- # pedestal (6)
- # re-frame (14)
- # reagent (33)
- # specter (4)
- # uncomplicate (8)
- # unrepl (15)
- # untangled (24)
- # yada (25)
Hah, that’s a surprise. Perhaps, I don’t really remember what I was thinking bad then. 🙂
When I cider-jack-in
outside of project, it success.
I guess this is because clj-refactor
Maybe.
when you cider-jack-in
you don’t need anything cider or clj-refactor related in your ~/.lein/profiles.clj
What must I do to get #break
to work? If I place a #break
and eval with cider-eval-defun-at-point
it doesn't break when I call the function.
@dpsutton quickly and untested thoroughly:
(defun cider--eval-bindings (bindings)
"Sends a (def bound-name expr) form to the cider repl for each
binding in bindings."
(let ((bound-name (pop bindings))
(init-expr (pop bindings)))
(when bound-name
(let ((form (concat "(def " bound-name " " init-expr ")")))
(set-buffer (cider--get-repl-buffer))
(insert form)
(cider-repl-return)
(cider--eval-bindings bindings)))))
(defun cider-eval-all-let-bindings ()
(interactive)
(when (cider--get-repl-buffer)
(cider--eval-bindings (clojure--read-let-bindings))))
looks cool. just off hand, maybe remember the variable names and make an easy way to unintern them?
if it's similar to what i did, i just grab that local environment which might be unbounded. not sure what we might clobber
also, with throwing your own defs in there, this is something to watch out for:
whatever> (def a 'bob)
#'whatever/a
whatever> a
bob
whatever> (defn a [x] (inc x))
#'whatever/a
whatever> a
#function[whatever/a]
Yes my version assumes so many things, good points up above for sure
Anothnr function would unbind all
i think that's why i like the idea of killing it so you can enter it wherever you like
Btw the read function is in clojure-mode
cider-invnstigate-bindings
maybe?
Or cider-repl-def-bindings
my version was run during the debugging session and would capture the local variables during debugging
(<--
code "#dbg
(defn func [x y z]
(let [a 1
b 2]
(let [c..."
column 0
coor (3 2 2)
debug-value "16"
file "c:/Projects/pomegranate/src/main/clojure/cemerick/whatever.c..."
id "6"
input-type (dict ...)
key "d0e9418e-65ac-41ad-9263-2c3e2aa8e681"
line 4
locals (("x" "1")
("y" "2")
("z" "3")
("a" "1")
("b" "2")
("c" "3")
("d" "4"))
original-id "74"
prompt nil
session "81f41c44-4cdd-4cd3-a027-5ccaeb53e6cc"
status ("need-debug-input")
)
Yes it looks at the code and sends def in the repl...Maybe a different feature
Because sometimes you want to use the value of something in a let
the benefit that i'm thinking of is you would captuze x y z and get those values and then you could investigate the form. since a, b, c, d are bound in the let you could just copy that over
No no, say I have a function, I know the value of the params, I have a let and i want to evaluate against those let bindings at runtime
So the the body of the let can be tweaked/debugged