From 1186018d3624730613c4d14211ebbf67070a1246 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 14 May 2021 09:33:27 -0500 Subject: [PATCH] Adding restclient and ob-restclient --- README.org | 18 +++++++++++++++++- init.el | 15 ++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index e0b59d02..457e3f91 100644 --- a/README.org +++ b/README.org @@ -773,6 +773,19 @@ Sometimes I need to edit CSV files quickly :mode ("\\.csv\\'" . csv-mode)) #+end_src +*** Restclient +Sometimes dealing with REST APIs it's easiest to do this incrementally with restclient.el +#+begin_src emacs-lisp +(use-package restclient + :commands (restclient-mode)) +#+end_src + +Let's also add org-babel support for this to create documentation easier. +#+begin_src emacs-lisp +(use-package ob-restclient + :after org) +#+end_src + ** File Management *** Dired I'm making a small function in here to open files in the appropriate program using XDG defaults. This is like opening odt files in Libreoffice or mp4 files in MPV. @@ -883,6 +896,7 @@ Part of this config includes some special capture templates for my work as a you #+begin_src emacs-lisp (use-package org :straight t + :ensure t :config (setq org-startup-indented t org-edit-src-content-indentation 0 @@ -897,7 +911,8 @@ Part of this config includes some special capture templates for my work as a you '((emacs-lisp . t) (python . t) (ditaa . t) - (shell . t))) + (shell . t) + (restclient . t))) (setq org-ditaa-jar-path "/usr/bin/ditaa") @@ -909,6 +924,7 @@ Part of this config includes some special capture templates for my work as a you (add-to-list 'org-structure-template-alist '("yaml" . "src yaml")) (add-to-list 'org-structure-template-alist '("yml" . "src yaml")) (add-to-list 'org-structure-template-alist '("q" . "quote")) + (add-to-list 'org-structure-template-alist '("rc" . "src restclient")) (setq org-capture-templates '(("t" "Personal todo" entry diff --git a/init.el b/init.el index 47be7d18..887f5345 100644 --- a/init.el +++ b/init.el @@ -443,6 +443,12 @@ vertically." (use-package csv-mode :mode ("\\.csv\\'" . csv-mode)) +(use-package restclient + :commands (restclient-mode)) + +(use-package ob-restclient + :after org) + (use-package dired :ensure nil :straight nil @@ -524,6 +530,7 @@ vertically." (use-package org :straight t + :ensure t :config (setq org-startup-indented t org-edit-src-content-indentation 0 @@ -538,7 +545,8 @@ vertically." '((emacs-lisp . t) (python . t) (ditaa . t) - (shell . t))) + (shell . t) + (restclient . t))) (setq org-ditaa-jar-path "/usr/bin/ditaa") @@ -550,6 +558,7 @@ vertically." (add-to-list 'org-structure-template-alist '("yaml" . "src yaml")) (add-to-list 'org-structure-template-alist '("yml" . "src yaml")) (add-to-list 'org-structure-template-alist '("q" . "quote")) + (add-to-list 'org-structure-template-alist '("rc" . "src restclient")) (setq org-capture-templates '(("t" "Personal todo" entry @@ -725,8 +734,8 @@ vertically." (setq org-roam-directory "~/org" org-roam-buffer-width 0.25 org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*" - org-roam-db-location "~/.dotemacs/org-roam.db" - org-roam-completion-everywhere t + org-roam-db-location "~/.dotemacs/org-roam.db" + org-roam-completion-everywhere t org-roam-capture-templates '(("d" "default" plain (function org-roam--capture-get-point) "%?"