pprint-json and better devpi-upload

This commit is contained in:
Jeremy Dormitzer 2019-08-26 10:11:44 -04:00
parent 1739e4969f
commit 425497c1df

View File

@ -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/<persisted-vars-file> 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: