Currently my org-capture-templates
look like this:
("I" "Inbox Timestamp" entry (file+headline "~/Dropbox/documents/org/roam/Inbox.org" "Inbox Timestamp") "* TODO %?\n%^{Effort}p\n%^{SCHEDULED}p")
This allows me to:
- Set effort estimate on the task
- Schedule date for the task
- Add a tag for the task
Can I get the same features with org-roam-capture-templates
?
This is how my current org-roam
template looks like:
(defun my/org-roam-capture-task ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(my/org-roam-filter-by-tag "project"))
:templates '(("p" "project" plain "** TODO %?"
:if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: project"
("Tasks"))))))
If I try to add those 3 features from org-capture-template
to org-roam-capture-template
, it looks something like this, right?
(only the :templates line was changed in the last code block)
(defun my/org-roam-capture-task ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(my/org-roam-filter-by-tag "project"))
:templates '(("p" "project" plain "** TODO %?\n%^{Effort}p\n%^{SCHEDULED}p"
:if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: project"
("Tasks"))))))
But when I invoke that function, I get “Wrong type argument: stringp, nil” error.
Am I doing something wrong?
Is it possible to add scheduled time as well as tags and effort estimates on org-roam templated tasks?