From d6ab20c0e6f0faaf36d6901dd73c067681db6d83 Mon Sep 17 00:00:00 2001 From: ry Date: Mon, 1 Nov 2021 22:30:21 -0700 Subject: [PATCH] Re-added some templates. --- .config/doom/config.el | 13 +++++++++++-- .config/doom/init.el | 4 ++-- Emacs.org | 19 ++++++++++++------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index d43c3f3..d56790c 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -202,7 +202,8 @@ (add-to-list 'org-structure-template-alist '("sh" . "src shell")) (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) - (add-to-list 'org-structure-template-alist '("py" . "src python"))) + (add-to-list 'org-structure-template-alist '("py" . "src python")) + (add-to-list 'org-structure-template-alist '("yml" . "src yaml"))) ;; ;; Define a function that automatically executes rymacs/org-babel-tangle-config (a wrapper around org-babel-tangle) when saving this file. ;; (defun rymacs/org-babel-tangle-config () @@ -225,9 +226,17 @@ "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t) - ("r" "def+resources" plain + ("r" "resources" plain (file "~/roam/templates/resource-template.org") :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t) + ("f" "files" plain + (file "~/roam/templates/res-file-note-temp.org") + :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t) + ("c" "cli" plain + (file "~/roam/templates/command-template.org") + :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t))) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) diff --git a/.config/doom/init.el b/.config/doom/init.el index 77fe378..00b84ef 100644 --- a/.config/doom/init.el +++ b/.config/doom/init.el @@ -152,13 +152,13 @@ ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - ;;python ; beautiful is better than ugly + python ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 ;;rest ; Emacs as a REST client ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good (scheme +guile) ; a fully conniving family of lisps diff --git a/Emacs.org b/Emacs.org index d0730fc..2b3fe23 100644 --- a/Emacs.org +++ b/Emacs.org @@ -31,7 +31,6 @@ I need to test that I can remove this still. #+end_src * General Configuration -** User Interface #+begin_src emacs-lisp @@ -53,7 +52,6 @@ I need to test that I can remove this still. * Theme Configuration I am using [[https://protesilaos.com/modus-themes/][Modus Themes]], by [[https://protesilaos.com/][Protesilaos Stavrou]] as they are minimal, pleasant to the eye, and conform to accessibility standards as outlined in [[https://www.w3.org/WAI/WCAG2AAA-Conformance][WCAG AAA]]. - ** Modus Theme Configuration #+begin_src emacs-lisp @@ -90,8 +88,7 @@ Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina. #+end_src -* Org Mode Configuration - +** Org Mode Configuration ** Set Fonts and Symbols Here we are setting general font configuration in order to make editing in org mode a bit more streamlined to look at. @@ -227,7 +224,6 @@ Main Org/Agenda configuration. #+end_src - ** Better Heading Bullets #+begin_src emacs-lisp @@ -288,7 +284,8 @@ Here we use a package called org-tempo. (add-to-list 'org-structure-template-alist '("sh" . "src shell")) (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) - (add-to-list 'org-structure-template-alist '("py" . "src python"))) + (add-to-list 'org-structure-template-alist '("py" . "src python")) + (add-to-list 'org-structure-template-alist '("yml" . "src yaml"))) #+end_src @@ -327,9 +324,17 @@ Since we don't want to have to manually use the org-babel-tangle function everyt "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t) - ("r" "def+resources" plain + ("r" "resources" plain (file "~/roam/templates/resource-template.org") :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t) + ("f" "files" plain + (file "~/roam/templates/res-file-note-temp.org") + :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t) + ("c" "cli" plain + (file "~/roam/templates/command-template.org") + :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t))) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find)