Function: denote-org-capture-with-prompts
denote-org-capture-with-prompts is an autoloaded and byte-compiled
function defined in denote.el.
Signature
(denote-org-capture-with-prompts &optional TITLE KEYWORDS SUBDIRECTORY DATE TEMPLATE SIGNATURE)
Documentation
Like denote-org-capture but with optional prompt parameters.
When called without arguments, do not prompt for anything. Just return the front matter with title and keyword fields empty and the date and identifier fields specified. Also make the file name consist of only the identifier plus the Org file name extension.
Otherwise produce a minibuffer prompt for every non-nil value that
corresponds to the TITLE, KEYWORDS, SUBDIRECTORY, DATE, TEMPLATE,
SIGNATURE arguments. The prompts are those used by the standard
denote command and all of its utility commands.
When returning the contents that fill in the Org capture
template, the sequence is as follows: front matter, TEMPLATE, and
then the value of the user option denote-org-capture-specifiers.
Important note: in the case of SUBDIRECTORY actual subdirectories
must exist---Denote does not create them. Same principle for
TEMPLATE as templates must exist and are specified in the user
option denote-templates.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;; TODO 2023-12-02: Maybe simplify `denote-org-capture-with-prompts'
;; by passing a single PROMPTS that is the same value as `denote-prompts'?
;;;###autoload
(defun denote-org-capture-with-prompts (&optional title keywords subdirectory date template signature)
"Like `denote-org-capture' but with optional prompt parameters.
When called without arguments, do not prompt for anything. Just
return the front matter with title and keyword fields empty and
the date and identifier fields specified. Also make the file
name consist of only the identifier plus the Org file name
extension.
Otherwise produce a minibuffer prompt for every non-nil value that
corresponds to the TITLE, KEYWORDS, SUBDIRECTORY, DATE, TEMPLATE,
SIGNATURE arguments. The prompts are those used by the standard
`denote' command and all of its utility commands.
When returning the contents that fill in the Org capture
template, the sequence is as follows: front matter, TEMPLATE, and
then the value of the user option `denote-org-capture-specifiers'.
Important note: in the case of SUBDIRECTORY actual subdirectories
must exist---Denote does not create them. Same principle for
TEMPLATE as templates must exist and are specified in the user
option `denote-templates'."
(let ((denote-prompts '()))
(when signature (push 'signature denote-prompts))
(when template (push 'template denote-prompts))
(when date (push 'date denote-prompts))
(when subdirectory (push 'subdirectory denote-prompts))
(when keywords (push 'keywords denote-prompts))
(when title (push 'title denote-prompts))
(denote-org-capture)))