jq-mode
jq-mode copied to clipboard
can i view the result in separate buffer in interactive mode
In interactive mode, how can I view the result in a separate view instead of replacing current buffer.
Thanks!
This hasn't been implemented. You might be able to jury-rig it with another window showing a copy of the current buffer.
I will look into how to implement this at a later date unless someone else is interested in working on it.
This is exactly what I just did for my doom-emacs config:
(defadvice! dan/jq-interactivly--show-original-other-window (fn beg end)
"TODO"
:around #'jq-interactively
(let ((cb (current-buffer)))
(with-current-buffer (get-buffer-create "*jq-interactive*")
(insert (with-current-buffer cb (buffer-string)))
(display-buffer (current-buffer) #'display-buffer-pop-up-window)
(with-current-buffer cb
(funcall fn beg end))
(kill-buffer-and-window)))))