diff --git a/emacs/init.org b/emacs/init.org index 610db65..761a50f 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -272,6 +272,15 @@ Checking if a buffer contains a string: (search-forward string nil t)))) #+END_SRC +Pretty-print JSON: +#+BEGIN_SRC emacs-lisp + (defun pprint-json (raw-json) + (with-temp-buffer + (insert raw-json) + (json-pretty-print (point-min) (point-max)) + (buffer-substring (point-min) (point-max)))) +#+END_SRC + ** Persisting variables between session The idea behind this is pretty simple - variables get persisted in ~/.emacs.d/ as a plist of (variable-name variable-value). @@ -3044,7 +3053,7 @@ The aws-mfa command: (defun devpi-upload () (interactive) (cl-letf (((symbol-function 'devpi-upload) (make-process-fn "devpi" "upload"))) - (devpi-upload))) + (message (devpi-upload)))) #+END_SRC * StumpWM A handy keybinding to connect to the StumpWM SBCL process via SLIME: