Function: org-capture-get-template
org-capture-get-template is a byte-compiled function defined in
org-capture.el.gz.
Signature
(org-capture-get-template)
Documentation
Get the template from a file or a function if necessary.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defun org-capture-get-template ()
"Get the template from a file or a function if necessary."
(org-capture-put
:template
(pcase (org-capture-get :template)
(`nil "")
((and (pred stringp) template) template)
(`(file ,file)
(let ((filename (expand-file-name file org-directory)))
(if (file-exists-p filename) (org-file-contents filename)
(format "* Template file %S not found" file))))
(`(function ,f)
(if (functionp f) (funcall f)
(format "* Template function %S not found" f)))
(_ "* Invalid capture template"))))