Closed agzam closed 1 year ago
I would like to perform some post-processing of the data retrieved.
With the normal verb block (in a heading) I can use verb-post-response-hook. For example, this is how I automatically convert response from json to edn.
verb-post-response-hook
(defun verb-post-response-h () "automatically transform json to edn" (with-current-buffer (current-buffer) (when (eq major-mode 'json-mode) (goto-char (point-min)) (clojure-edn-json-transform) (clojure-mode) (verb-response-body-mode +1) (deactivate-mark)))) (add-hook 'verb-post-response-hook #'verb-post-response-h)
you can find the implementation of (clojure-edn-json-transform) over here
I would like to do something similar with results of verb source blocks. Is that possible?
Oh, wait. I got it all wrong. verb-post-response-hook it seems, works in both cases. That's so awesome.
I would like to perform some post-processing of the data retrieved.
With the normal verb block (in a heading) I can use
verb-post-response-hook
. For example, this is how I automatically convert response from json to edn.you can find the implementation of (clojure-edn-json-transform) over here
I would like to do something similar with results of verb source blocks. Is that possible?