0

I am running org version: 9.1.9 and have issues setting up a template for org-capture. I have read over the documentation but cannot figure out why my template throws this error when I call it: org-capture: Capture template ‘pt’: Template is not a valid Org entry or tree

current setup for org mode

(custom-set-variables
 '(org-agenda-files (quote ("life.org" "work.org")))
 '(org-capture-templates
   (quote
    (("p" "Private templates")
     ("pt" "TODO entry" entry
      (file+headline "life.org" "Capture")
      "templates/tmpl-todo.org" :empty-lines-before 1))))
 '(org-directory "~/Sync/org/")
 '(org-refile-allow-creating-parent-nodes (quote confirm))
 '(org-refile-targets (quote ((org-agenda-files :level . 1))))
 '(org-refile-use-outline-path (quote file))
 '(safe-local-variable-values
   (quote
    ((eval add-hook
       (quote after-save-hook)
       (lambda nil
         (org-babel-tangle))
       nil t)))))

file in templates/: tmpl-todo.org

* TODO %^{Description}
  %?
  :LOGBOOK:
  - Added: %U
  :END:

thanks.

0

I think it should be (file "templates/tmpl-todo.org") in the last line of the template so the whole thing reads:

'(org-capture-templates
   (quote
     (("p" "Private templates")
      ("pt" "TODO entry" entry
        (file+headline "life.org" "Capture")
        (file "templates/tmpl-todo.org") :empty-lines-before 1))))

For more information, do describe-variable on org-capture-templates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy