From 9b136d6fbfa5f91bb49d1cb014df6fa78b96c5cc Mon Sep 17 00:00:00 2001 From: Zelong Kuang Date: Sun, 7 Dec 2025 20:20:20 +1100 Subject: [PATCH] ``` feat(org): Add comprehensive org-capture templates Configure org-capture-templates with personal and project-specific capture options including todos, notes, journal entries, and changelogs for both local and centralized project management. ``` --- config.el | 26 ++++++++++++++++++++++++++ config.org | 28 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/config.el b/config.el index b332811..4ac8c02 100644 --- a/config.el +++ b/config.el @@ -164,3 +164,29 @@ (use-package! org-modern :config (setq org-modern-table nil)) + +(setq org-capture-templates + '(("t" "Personal todo" entry (file+headline +org-capture-todo-file "Inbox") + "* TODO %?\n%i\n%a" :prepend t) + ("n" "Personal notes" entry (file+headline +org-capture-notes-file "Inbox") + "* %u %?\n%i\n%a" :prepend t) + ("j" "Journal" entry (file+olp+datetree +org-capture-journal-file) + "* %U %?\n%i\n%a" :prepend t) + ("p" "Templates for projects") + ("pt" "Project-local todo" entry + (file+headline +org-capture-project-todo-file "Inbox") "* TODO %?\n%i\n%a" + :prepend t) + ("pn" "Project-local notes" entry + (file+headline +org-capture-project-notes-file "Inbox") "* %U %?\n%i\n%a" + :prepend t) + ("pc" "Project-local changelog" entry + (file+headline +org-capture-project-changelog-file "Unreleased") + "* %U %?\n%i\n%a" :prepend t) + ("o" "Centralized templates for projects") + ("ot" "Project todo" entry #'+org-capture-central-project-todo-file + "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil) + ("on" "Project notes" entry #'+org-capture-central-project-notes-file + "* %U %?\n %i\n %a" :heading "Notes" :prepend t) + ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file + "* %U %?\n %i\n %a" :heading "Changelog" :prepend t)) + ) diff --git a/config.org b/config.org index 4917100..b91a8ab 100644 --- a/config.org +++ b/config.org @@ -298,3 +298,31 @@ Thisenables the feature of auto-expanding snippets when matching the pattern :config (setq org-modern-table nil)) #+end_src +**** Org capture template +#+begin_src emacs-lisp +(setq org-capture-templates + '(("t" "Personal todo" entry (file+headline +org-capture-todo-file "Inbox") + "* TODO %?\n%i\n%a" :prepend t) + ("n" "Personal notes" entry (file+headline +org-capture-notes-file "Inbox") + "* %u %?\n%i\n%a" :prepend t) + ("j" "Journal" entry (file+olp+datetree +org-capture-journal-file) + "* %U %?\n%i\n%a" :prepend t) + ("p" "Templates for projects") + ("pt" "Project-local todo" entry + (file+headline +org-capture-project-todo-file "Inbox") "* TODO %?\n%i\n%a" + :prepend t) + ("pn" "Project-local notes" entry + (file+headline +org-capture-project-notes-file "Inbox") "* %U %?\n%i\n%a" + :prepend t) + ("pc" "Project-local changelog" entry + (file+headline +org-capture-project-changelog-file "Unreleased") + "* %U %?\n%i\n%a" :prepend t) + ("o" "Centralized templates for projects") + ("ot" "Project todo" entry #'+org-capture-central-project-todo-file + "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil) + ("on" "Project notes" entry #'+org-capture-central-project-notes-file + "* %U %?\n %i\n %a" :heading "Notes" :prepend t) + ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file + "* %U %?\n %i\n %a" :heading "Changelog" :prepend t)) + ) +#+end_src