Variable: denote-templates
denote-templates is a customizable variable defined in denote.el.
Value
nil
Documentation
Alist of content templates for new notes.
A template is arbitrary text that Denote will add to a newly created note right below the front matter.
Templates are expressed as a (KEY . VALUE) association.
- The KEY is the name which identifies the template. It is an
arbitrary symbol, such as report, memo, statement.
- The VALUE is either a string or the symbol of a function.
- If it is a string, it is ordinary text that Denote will insert
as-is. It can contain newline characters to add spacing. The
manual of Denote contains examples on how to use the concat
function, beside writing a generic string.
- If it is a function, it is called without arguments and is expected
to return a string. Denote will call the function and insert the
result in the buffer.
The user can choose a template either by invoking the command
denote-template or by changing the user option denote-prompts
to always prompt for a template when calling the denote
command.
This variable was added, or its default value changed, in denote version 3.1.0.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defcustom denote-templates nil
"Alist of content templates for new notes.
A template is arbitrary text that Denote will add to a newly
created note right below the front matter.
Templates are expressed as a (KEY . VALUE) association.
- The KEY is the name which identifies the template. It is an
arbitrary symbol, such as `report', `memo', `statement'.
- The VALUE is either a string or the symbol of a function.
- If it is a string, it is ordinary text that Denote will insert
as-is. It can contain newline characters to add spacing. The
manual of Denote contains examples on how to use the `concat'
function, beside writing a generic string.
- If it is a function, it is called without arguments and is expected
to return a string. Denote will call the function and insert the
result in the buffer.
The user can choose a template either by invoking the command
`denote-template' or by changing the user option `denote-prompts'
to always prompt for a template when calling the `denote'
command."
:type '(alist :key-type symbol :value-type (choice string function))
:package-version '(denote . "3.1.0")
:link '(info-link "(denote) The denote-templates option")
:group 'denote)