From e3fa2649f6eb16073c966cdad84a288cbc384757 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Sun, 21 Apr 2024 16:14:21 -0400 Subject: [PATCH] emacs-configuration: Update org & org-roam capture-templates --- user-config/emacs/.emacs.d/config.org | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/user-config/emacs/.emacs.d/config.org b/user-config/emacs/.emacs.d/config.org index 02cf46b..f144452 100644 --- a/user-config/emacs/.emacs.d/config.org +++ b/user-config/emacs/.emacs.d/config.org @@ -1993,15 +1993,21 @@ Use [[http://gnuplot.sourceforge.net/][gnuplot]] alongside org-mode to generate (file+olp "~/.org/roam/agenda/capture.org" "Triage") "* PHONE %?\n %U\n" :clock-in t :clock-resume t) - ;; ;; TODO: these should likely be moved into org-roam-dailies capture templates - ;; ("l" "Templates for logging") - ;; ("ll" "Log" entry - ;; (file+datetree "~/.org/logbook.org") - ;; "* %?\n Entered on %U\n %i\n") - ;; ("lf" "Log with file link" entry - ;; (file+datetree "~/.org/logbook.org") - ;; "* %?\n Entered on %U\n %i\n %a") - )) + ;; Note: it would be preferred to reference these by id instead of file, but this + ;; causes headlines to be inserted at the wrong level. Namely, if the file being + ;; inserted into ends with a level n node, if id is used to select the node, a n+1 + ;; level node will be inserted instead of a level 0 (top-level) node. + ("k" "Templates for knowledge base") + ("kp" "person" entry + (file "~/.org/roam/20220515230259-people.org") + "* %^{name}%?\n") + ("kb" "book" entry + (file "~/.org/roam/20220804144029-books.org") + "* %^{title}%?\n") + ("ks" "software" entry + (file "~/.org/roam/20220908170736-software.org") + "* %^{name} + %?"))) ;; Automatically give all capture entries an id (add-hook 'org-capture-mode-hook #'org-id-get-create) @@ -2124,20 +2130,11 @@ Use [[http://gnuplot.sourceforge.net/][gnuplot]] alongside org-mode to generate (org-roam-node-display-template (concat "${title:*} " (propertize "${tags:45}" 'face 'org-tag))) (org-roam-capture-templates - ;; TODO: ROAM_ref (formally roam_key) can not be set in the file PROPERTIES in roam v2 - ;; See: https://github.com/org-roam/org-roam/issues/1920 '(("d" "default" plain "%?" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} ") - :unnarrowed t) - ("p" "person" entry "* %^{name}%?" - :target (node "863ddb0b-ed30-4cf6-86c7-915afda0c0d1")) - ("b" "book" entry "* %^{name}%?" - :target (node "64a98813-bdf8-4813-9f4e-e1153170ffa9")) - ("s" "software" entry "* %^{name} - %?" - :target (node "d0c93085-3e96-4f4b-ad83-ced92cf4de33")))) + :unnarrowed t))) (org-roam-dailies-directory "") (org-roam-dailies-capture-templates '(("d" "default" entry "* %?" :target (file+datetree "dailies.org.gpg" week))))