aboutsummaryrefslogtreecommitdiff
path: root/doom.d/config.org
diff options
context:
space:
mode:
authororeodave <aryadevchavali1@gmail.com>2019-09-26 08:54:26 +0100
committeroreodave <aryadevchavali1@gmail.com>2019-09-26 08:54:26 +0100
commit0de298f0759c7f0ff0ac61c683df97e19da42a6d (patch)
treedb0866ce32c16d0bf3a9dcb6d2087881500df7a6 /doom.d/config.org
parent16ccefb723263129754d8cb901b771daa5c17576 (diff)
downloaddotfiles-0de298f0759c7f0ff0ac61c683df97e19da42a6d.tar.gz
dotfiles-0de298f0759c7f0ff0ac61c683df97e19da42a6d.tar.bz2
dotfiles-0de298f0759c7f0ff0ac61c683df97e19da42a6d.zip
+feature to download json and parse it in emacs
Restclient doesn't seem to work anymore (at least for my ASP.NET API), thus making this thing to do gets quickly
Diffstat (limited to 'doom.d/config.org')
-rw-r--r--doom.d/config.org18
1 files changed, 18 insertions, 0 deletions
diff --git a/doom.d/config.org b/doom.d/config.org
index 86a8453..43d8cd0 100644
--- a/doom.d/config.org
+++ b/doom.d/config.org
@@ -139,6 +139,24 @@ My docsets are stored in .docsets for ease of use
(interactive)
(wttrin (shell-command-to-string "pass location"))))
#+END_SRC
+*** Download JSON
+#+BEGIN_SRC emacs-lisp
+(defun oreodave/request-json-fn (url)
+ (set-process-sentinel
+ (start-process-shell-command "request-json" "*request-json*" (format "curl %s" url))
+ (lambda (process event)
+ (when (memq (process-status process) '(exit stop))
+ (message "Request finished")
+ (with-current-buffer "*request-json*"
+ (json-mode)
+ (json-mode-beautify))))))
+
+
+(defun oreodave/request-json ()
+ (interactive)
+ (oreodave/request-json-fn (read-string "Enter url: "))
+ )
+#+END_SRC
*** Themes
#+BEGIN_SRC emacs-lisp
(setq oreodave/aesthetics/list '(doom-molokai doom-peacock doom-solarized-dark))