From e3931540c0b8f034061fe8f88fb9f1f7cc88c66a Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 29 May 2021 13:33:04 -0400 Subject: [PATCH] Rewrite org-tempo config with a dolist --- config.org | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/config.org b/config.org index f002cd1..f224869 100644 --- a/config.org +++ b/config.org @@ -247,20 +247,21 @@ Define templates for lots of common structure elements. Mostly just used within :after org :straight (:type built-in) :config - ;; TODO: There's gotta be a more efficient way to write this - (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) - (add-to-list 'org-structure-template-alist '("sp" . "src conf :tangle ~/.spectrwm.conf")) - (add-to-list 'org-structure-template-alist '("ash" . "src shell :tangle ~/.config/ash/ashrc")) - (add-to-list 'org-structure-template-alist '("pi" . "src conf :tangle ~/.config/picom/picom.conf")) - (add-to-list 'org-structure-template-alist '("git" . "src conf :tangle ~/.gitconfig")) - (add-to-list 'org-structure-template-alist '("du" . "src conf :tangle ~/.config/dunst/dunstrc")) - (add-to-list 'org-structure-template-alist '("za" . "src conf :tangle ~/.config/zathura/zathurarc")) - (add-to-list 'org-structure-template-alist '("ff1" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css")) - (add-to-list 'org-structure-template-alist '("ff2" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userContent.css")) - (add-to-list 'org-structure-template-alist '("xr" . "src conf :tangle ~/.Xresources")) - (add-to-list 'org-structure-template-alist '("tm" . "src conf :tangle ~/.tmux.conf")) - (add-to-list 'org-structure-template-alist '("gp" . "src conf :tangle ~/.gnupg/gpg.conf")) - (add-to-list 'org-structure-template-alist '("ag" . "src conf :tangle ~/.gnupg/gpg-agent.conf"))) + (dolist (addition '(("el" . "src emacs-lisp") + ("el" . "src emacs-lisp") + ("sp" . "src conf :tangle ~/.spectrwm.conf") + ("ash" . "src shell :tangle ~/.config/ash/ashrc") + ("pi" . "src conf :tangle ~/.config/picom/picom.conf") + ("git" . "src conf :tangle ~/.gitconfig") + ("du" . "src conf :tangle ~/.config/dunst/dunstrc") + ("za" . "src conf :tangle ~/.config/zathura/zathurarc") + ("ff1" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css") + ("ff2" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userContent.css") + ("xr" . "src conf :tangle ~/.Xresources") + ("tm" . "src conf :tangle ~/.tmux.conf") + ("gp" . "src conf :tangle ~/.gnupg/gpg.conf") + ("ag" . "src conf :tangle ~/.gnupg/gpg-agent.conf"))) + (add-to-list 'org-structure-template-alist addition))) #+end_src * Autocompletion ** Ivy -- 2.39.2