Created
April 16, 2020 13:26
-
-
Save jackrusher/e628abb653429c22bc6330752b3e49a5 to your computer and use it in GitHub Desktop.
Convert the current region in emacs from JSON to EDN using Bork's Jet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Uses https://github.com/borkdude/jet | |
;; On OSX, install jet with: | |
;; brew install borkdude/brew/jet | |
;; I invoke this with M-x, you might want to bind it to a key | |
(defun json->edn () | |
(interactive) | |
(shell-command-on-region (region-beginning) | |
(region-end) | |
"jet --pretty --keywordize keyword --from json --to edn" | |
(current-buffer) | |
t)) |
How can I install this function in my emacs?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tweaked it a bit into the following: