Fork me on GitHub
#cider
<
2021-04-16
>
bozhidar05:04:23

I don’t think we need more help with this particular issue, but there are always other issues one can tackle. 😄

jmckitrick14:04:09

I really need to do that. Let me see what I can find.

macrobartfast19:04:03

what is the cider command that lets me evaluate a function under the point in the minibuffer, supplying arguments?

macrobartfast19:04:14

or an equivalent.

macrobartfast19:04:42

I’m constantly typing out functions in my buffer with arguments so I can evaluate them then deleting them. So, if I made

(defn foobar [x]
  (* 2 x))
I would then write
(foobar 8)
below it and run a cider eval on it, then delete it. Alternately I suppose I could copy paste it into the repl, but that would take as much time.

macrobartfast20:04:59

aha, found it: cider-read-and-eval-defun-at-point

macrobartfast20:04:28

I remember now. I also remember I was getting errors and that’s why I had stopped using it and thus forgotten it.

macrobartfast20:04:03
replied to a thread:

I am also open to better approaches… basically, I write a function that takes a few arguments that would be normally supplied by a calling function; I want to try it out with some fake arguments without having to write it out in my file with those arguments. Currently, I write it in the buffer with the mock arguments so I can call cider-eval-defun-at-point or cider-eval-last-sexp

macrobartfast20:04:37

I then delete it.

macrobartfast20:04:19

I do this with most functions I define, so dozens of times a day. Probably my doing this is the result of a bad approach… not sure.