Function: denote-prepend-front-matter
denote-prepend-front-matter is a byte-compiled function defined in
denote.el.
Signature
(denote-prepend-front-matter FILE TITLE KEYWORDS SIGNATURE DATE ID FILE-TYPE)
Documentation
Prepend front matter to FILE.
The TITLE, KEYWORDS, DATE, ID, SIGNATURE, and FILE-TYPE are passed from the renaming command and are used to construct a new front matter block if appropriate.
Aliases
denote--add-front-matter (obsolete since 4.0.0)
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-prepend-front-matter (file title keywords signature date id file-type)
"Prepend front matter to FILE.
The TITLE, KEYWORDS, DATE, ID, SIGNATURE, and FILE-TYPE are passed from
the renaming command and are used to construct a new front matter block
if appropriate."
(when-let* ((new-front-matter (denote--format-front-matter title date keywords id signature file-type)))
(with-current-buffer (find-file-noselect file)
(goto-char (point-min))
(insert new-front-matter))))