Add custom agenda commands and capture templates for org-agenda-api container

- Add simplified org-agenda-custom-commands for API (n, s, i, w, h, M)
- Add org-agenda-api-capture-templates (gtd-todo, scheduled-todo, deadline-todo)
- Templates use INBOX state and include CREATED property

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-14 09:49:12 -08:00
parent 5304640c79
commit ccc49ce341

View File

@@ -371,6 +371,46 @@
echo "Warning: org-config-custom.el not found after tangle"
touch $out/custom-config.el
fi
# Append custom agenda commands and capture templates for the API
cat >> $out/custom-config.el << 'ELISP'
;; Custom agenda commands for API
(setq org-agenda-custom-commands
'(("n" "Next actions" todo "NEXT")
("s" "Started tasks" todo "STARTED")
("i" "Inbox" todo "INBOX")
("w" "Waiting tasks" todo "WAIT")
("h" "High priority" tags-todo "+PRIORITY<\"C\"")
("M" "Main view"
((agenda "" ((org-agenda-span 5)))
(todo "NEXT")
(todo "STARTED")
(todo "INBOX")))))
;; Capture templates for API
(setq org-agenda-api-capture-templates
'(("gtd-todo"
:name "GTD Todo"
:template ("t" "Todo" entry (file "/data/org/inbox.org")
"* INBOX %^{Title}\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
:immediate-finish t)
:prompts (("Title" :type string :required t)))
("scheduled-todo"
:name "Scheduled Todo"
:template ("s" "Scheduled" entry (file "/data/org/inbox.org")
"* INBOX %^{Title}\nSCHEDULED: %^{When}t\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
:immediate-finish t)
:prompts (("Title" :type string :required t)
("When" :type date :required t)))
("deadline-todo"
:name "Todo with Deadline"
:template ("d" "Deadline" entry (file "/data/org/inbox.org")
"* INBOX %^{Title}\nDEADLINE: %^{When}t\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
:immediate-finish t)
:prompts (("Title" :type string :required t)
("When" :type date :required t)))))
ELISP
'';
# Build customized org-agenda-api container