Commands to thread and unwind code in Emacs-Lisp01 Mar 2016, by Artur Malabarba.
As you may remember, one of the commands I like the most from the
package are the ones that thread and unwind Clojure code forms for you. Now that
Emacs is also getting built-in threading macros, I figured the best way to give
them a fair chance in life is to also make them pretty convenient to use.
The point here is that you can place point before a paren, invoke a command, and
a regular code form gets transformed into a threading macro, or vice-versa. See
the linked post for what that means. Instead of writing whole new commands for
that, I had a fun time just hacking
clj-refactor commands to work on
It should go without saying, you need clj-refactor installed for this to work.
Maybe just writing it from scratch would have made for shorter code (it would certainly be more robust). But such is life. I try not to dwell too much on quick hacks.