Fork me on GitHub
#cider
<
2020-04-04
>
Jim Newton13:04:44

Hi cider users. What's the correct way to expand a macro in Cider? In slime it is C-c RET

yuhan13:04:15

M-x cider-macroexpand (-1/all), I think it's also bound to C-c RET

Jim Newton14:04:19

doesn't work for me. it does something bizarre. for example if I sit my cursor on the opening paren of an

(assert (< 1 (count operands))
   (format "traverse-pattern should have already eliminated this case: re=%s count=%s operands=%s" re (count operands) operands))
and press C-c RET, I see the following:
[operands functions]

yuhan14:04:40

The cursor has to be placed directly after the sexp (yeah, it's not very ergonomic)

Jim Newton14:04:02

ahh in slime it has to be on the opening paren

bozhidar16:04:17

I guess that might be on me - I almost always navigate to the end of the forms, that’s why this behaviour seems natural to me. 😄

bozhidar16:04:16

Probably we can make the command a bit smarter when it comes to the cursor placement.

genmeblog17:04:22

Hey, hey, just updated clj-refactor and got the error about unbalanced parantheses clj-refactor-20200404.907/clj-refactor.el

bozhidar17:04:15

@tsulej Yeah, I made a silly mistake. A patch was just merged to master.

bozhidar17:04:35

(copy-pasting doesn’t work well with Lisps 😄 )