since “tap> is the new print” 😜 are there any helper fns in cider or clojure mode for tapping? (e.g. like there are for pretty printing)?
I am not aware of any cider commands for tap>. I tend to use cider-inspect rather than tap when using Emacs
thanks!
I assume it wouldn't be too difficult to write some. I believe you can write a bit of elisp to call Clojure code and then bind that in an interactive function to a key
I have just been using a rich comment block to call tap functions for now. https://github.com/practicalli/scicloj-notespace-simple-demo/blob/live/src/practicalli/notespace_demo.clj#L145 I also use a user.clj to run the portal data browser and add it as a tap source. There is an example in the dev/user.clj file in the repository above
Thanks @jr0cket. I use the cider inspector as well, but sometimes things like portal etc. can come in handy. I’ve ended up doing this:
(defun prnc/clojure-eval-tap ()
(interactive)
(cider-interactive-eval
(format "(tap> %s)"
(apply #'buffer-substring-no-properties
(cider-last-sexp 'bounds)))))
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode (kbd "et") 'prnc/clojure-eval-tap)
as a quick hack to see if I like this workflow