Function: denote--creation-get-note-data-from-prompts
denote--creation-get-note-data-from-prompts is a byte-compiled
function defined in denote.el.
Signature
(denote--creation-get-note-data-from-prompts)
Documentation
Retrieve the data necessary for note creation.
The data elements are: title, keywords, file-type, directory, date, template and signature.
It is retrieved from prompts according to denote-prompts and
from denote-use-* variables. For example, if
denote-use-title is set to a title, then no prompts happen for
the title and the value of denote-use-title will be used
instead.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote--creation-get-note-data-from-prompts ()
"Retrieve the data necessary for note creation.
The data elements are: title, keywords, file-type, directory,
date, template and signature.
It is retrieved from prompts according to `denote-prompts' and
from `denote-use-*' variables. For example, if
`denote-use-title' is set to a title, then no prompts happen for
the title and the value of `denote-use-title' will be used
instead."
(let (title keywords file-type directory date identifier template signature)
(dolist (prompt denote-prompts)
(pcase prompt
('title (unless denote-use-title
(setq title (denote-title-prompt
(when (and (not denote-ignore-region-in-denote-command)
(use-region-p))
(buffer-substring-no-properties
(region-beginning)
(region-end)))))))
('keywords (when (eq denote-use-keywords 'default)
(setq keywords (denote-keywords-prompt))))
('file-type (unless denote-use-file-type
(setq file-type (denote-file-type-prompt))))
('subdirectory (unless denote-use-directory
(setq directory (denote-subdirectory-prompt))))
('date (unless denote-use-date
(setq date (denote-date-prompt))))
('identifier (unless denote-use-identifier
(setq identifier (denote-identifier-prompt))))
('template (unless denote-use-template
(setq template (denote-template-prompt))))
('signature (unless denote-use-signature
(setq signature (denote-signature-prompt))))))
(list title keywords file-type directory date identifier template signature)))