Function: org-capture-set-plist
org-capture-set-plist is a byte-compiled function defined in
org-capture.el.gz.
Signature
(org-capture-set-plist ENTRY)
Documentation
Initialize the property list for ENTRY from the template definition.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defvar org-clock-marker) ; Defined in org.el
(defun org-capture-set-plist (entry)
"Initialize the property list for ENTRY from the template definition."
(setq org-capture-plist (copy-sequence (nthcdr 5 entry)))
(org-capture-put :key (car entry) :description (nth 1 entry)
:target (nth 3 entry))
(let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
(when (or (not txt) (and (stringp txt) (not (string-match "\\S-" txt))))
;; The template may be empty or omitted for special types.
;; Here we insert the default templates for such cases.
(cond
((eq type 'item) (setq txt "- %?"))
((eq type 'checkitem) (setq txt "- [ ] %?"))
((eq type 'table-line) (setq txt "| %? |"))
((member type '(nil entry)) (setq txt "* %?\n %a"))))
(org-capture-put :template txt :type type)))