]> git.armaanb.net Git - config.org.git/commitdiff
Rewrite org-tempo config with a dolist
authorArmaan Bhojwani <me@armaanb.net>
Sat, 29 May 2021 17:33:04 +0000 (13:33 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sat, 29 May 2021 17:33:04 +0000 (13:33 -0400)
config.org

index f002cd18c4ebe7b3f2c3122f5ab47562c67cb520..f224869a02ef82034ed9488ae90bc64a7a865ae0 100644 (file)
@@ -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