Variable: denote-file-types
denote-file-types is a variable defined in denote.el.
Value
Large value
((org :extension ".org" :get-file-type-function nil :front-matter
denote-org-front-matter :title-key-regexp "^#\\+title\\s-*:"
:title-value-function denote-format-string-for-org-front-matter
:title-value-reverse-function denote-trim-whitespace
:keywords-key-regexp "^#\\+filetags\\s-*:"
:keywords-value-function
denote-format-keywords-for-org-front-matter
:keywords-value-reverse-function
denote-extract-keywords-from-front-matter :signature-key-regexp
"^#\\+signature\\s-*:" :signature-value-function
denote-format-string-for-org-front-matter
:signature-value-reverse-function denote-trim-whitespace
:identifier-key-regexp "^#\\+identifier\\s-*:"
:identifier-value-function
denote-format-string-for-org-front-matter
:identifier-value-reverse-function denote-trim-whitespace
:date-key-regexp "^#\\+date\\s-*:" :date-value-function
denote-date-org-timestamp :date-value-reverse-function
denote-extract-date-from-front-matter :link-retrieval-format
"[denote:%VALUE%]" :link denote-org-link-format
:link-in-context-regexp denote-org-link-in-context-regexp)
(markdown-yaml :extension ".md" :get-file-type-function
denote-get-file-type-markdown-yaml :front-matter
denote-yaml-front-matter :title-key-regexp
"^title\\s-*:" :title-value-function
denote-format-string-for-md-front-matter
:title-value-reverse-function
denote-trim-whitespace-then-quotes
:keywords-key-regexp "^tags\\s-*:"
:keywords-value-function
denote-format-keywords-for-md-front-matter
:keywords-value-reverse-function
denote-extract-keywords-from-front-matter
:signature-key-regexp "^signature\\s-*:"
:signature-value-function
denote-format-string-for-md-front-matter
:signature-value-reverse-function
denote-trim-whitespace-then-quotes
:identifier-key-regexp "^identifier\\s-*:"
:identifier-value-function
denote-format-string-for-md-front-matter
:identifier-value-reverse-function
denote-trim-whitespace-then-quotes :date-key-regexp
"^date\\s-*:" :date-value-function denote-date-rfc3339
:date-value-reverse-function
denote-extract-date-from-front-matter
:link-retrieval-format "(denote:%VALUE%)" :link
denote-md-link-format :link-in-context-regexp
denote-md-link-in-context-regexp)
(markdown-toml :extension ".md" :get-file-type-function
denote-get-file-type-markdown-toml :front-matter
denote-toml-front-matter :title-key-regexp
"^title\\s-*=" :title-value-function
denote-format-string-for-md-front-matter
:title-value-reverse-function
denote-trim-whitespace-then-quotes
:keywords-key-regexp "^tags\\s-*="
:keywords-value-function
denote-format-keywords-for-md-front-matter
:keywords-value-reverse-function
denote-extract-keywords-from-front-matter
:signature-key-regexp "^signature\\s-*="
:signature-value-function
denote-format-string-for-md-front-matter
:signature-value-reverse-function
denote-trim-whitespace-then-quotes
:identifier-key-regexp "^identifier\\s-*="
:identifier-value-function
denote-format-string-for-md-front-matter
:identifier-value-reverse-function
denote-trim-whitespace-then-quotes :date-key-regexp
"^date\\s-*=" :date-value-function denote-date-rfc3339
:date-value-reverse-function
denote-extract-date-from-front-matter
:link-retrieval-format "(denote:%VALUE%)" :link
denote-md-link-format :link-in-context-regexp
denote-md-link-in-context-regexp)
(text :extension ".txt" :get-file-type-function nil :front-matter
denote-text-front-matter :title-key-regexp "^title\\s-*:"
:title-value-function denote-format-string-for-org-front-matter
:title-value-reverse-function denote-trim-whitespace
:keywords-key-regexp "^tags\\s-*:" :keywords-value-function
denote-format-keywords-for-text-front-matter
:keywords-value-reverse-function
denote-extract-keywords-from-front-matter :signature-key-regexp
"^signature\\s-*:" :signature-value-function
denote-format-string-for-org-front-matter
:signature-value-reverse-function denote-trim-whitespace
:identifier-key-regexp "^identifier\\s-*:"
:identifier-value-function
denote-format-string-for-org-front-matter
:identifier-value-reverse-function denote-trim-whitespace
:date-key-regexp "^date\\s-*:" :date-value-function
denote-date-iso-8601 :date-value-reverse-function
denote-extract-date-from-front-matter :link-retrieval-format
"[denote:%VALUE%]" :link denote-org-link-format
:link-in-context-regexp denote-org-link-in-context-regexp))
Documentation
Alist of variable denote-file-type(var)/denote-file-type(fun) and their format properties.
Each element is of the form (SYMBOL PROPERTY-LIST). SYMBOL is one of
those specified in the user option denote-file-type(var)/denote-file-type(fun) or an arbitrary
symbol that defines a new file type.
PROPERTY-LIST is a plist that consists of the following elements:
- :extension is a string with the file extension including the
period.
- :get-file-type-function a function with one parameter, a given file,
that reads the file contents and returns the file type as a symbol or
nil. If there is no function, Denote will fall back to a search for a
title in the front matter (per :title-key-regexp, which is described
below).
- :date-function is a function that can format a date. See the
functions denote-date-iso-8601, denote-date-rfc3339, and
denote-date-org-timestamp.
- :front-matter is either a string passed to format or a
variable holding such a string. The format function accepts
four arguments, which come from denote in this order: TITLE,
DATE, KEYWORDS, IDENTIFIER. Read the docstring of format on
how to reorder arguments.
- :title-key-regexp is a regular expression that is used to
retrieve the title line in a file. The first line matching
this regexp is considered the title line.
- :title-value-function is the function used to format the raw
title string for inclusion in the front matter (e.g. to
surround it with quotes). Use the identity function if no
further processing is required.
- :title-value-reverse-function is the function used to
retrieve the raw title string from the front matter. It
performs the reverse of :title-value-function.
- :keywords-key-regexp is a regular expression used to retrieve
the keywords' line in the file. The first line matching this
regexp is considered the keywords' line.
- :keywords-value-function is the function used to format the
keywords' list of strings as a single string, with appropriate
delimiters, for inclusion in the front matter.
- :keywords-value-reverse-function is the function used to
retrieve the keywords' value from the front matter. It
performs the reverse of the :keywords-value-function.
- :link-retrieval-format is a string, or variable holding a string,
that specifies the retrieval format of a link.
- :link is a string, or variable holding a string, that
specifies the format of a link. See the variables
denote-org-link-format, denote-md-link-format.
- :link-in-context-regexp is a regular expression that is used
to match the aforementioned link format. See the variables
denote-org-link-in-context-regexp,denote-md-link-in-context-regexp.
If the user option denote-file-type(var)/denote-file-type(fun) is nil, use the first element of
this list for new note creation. The default is org.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defvar denote-file-types
'((org
:extension ".org"
:get-file-type-function nil
:front-matter denote-org-front-matter
:title-key-regexp "^#\\+title\\s-*:"
:title-value-function denote-format-string-for-org-front-matter
:title-value-reverse-function denote-trim-whitespace
:keywords-key-regexp "^#\\+filetags\\s-*:"
:keywords-value-function denote-format-keywords-for-org-front-matter
:keywords-value-reverse-function denote-extract-keywords-from-front-matter
:signature-key-regexp "^#\\+signature\\s-*:"
:signature-value-function denote-format-string-for-org-front-matter
:signature-value-reverse-function denote-trim-whitespace
:identifier-key-regexp "^#\\+identifier\\s-*:"
:identifier-value-function denote-format-string-for-org-front-matter
:identifier-value-reverse-function denote-trim-whitespace
:date-key-regexp "^#\\+date\\s-*:"
:date-value-function denote-date-org-timestamp
:date-value-reverse-function denote-extract-date-from-front-matter
:link-retrieval-format "[denote:%VALUE%]"
:link denote-org-link-format
:link-in-context-regexp denote-org-link-in-context-regexp)
(markdown-yaml
:extension ".md"
:get-file-type-function denote-get-file-type-markdown-yaml
:front-matter denote-yaml-front-matter
:title-key-regexp "^title\\s-*:"
:title-value-function denote-format-string-for-md-front-matter
:title-value-reverse-function denote-trim-whitespace-then-quotes
:keywords-key-regexp "^tags\\s-*:"
:keywords-value-function denote-format-keywords-for-md-front-matter
:keywords-value-reverse-function denote-extract-keywords-from-front-matter
:signature-key-regexp "^signature\\s-*:"
:signature-value-function denote-format-string-for-md-front-matter
:signature-value-reverse-function denote-trim-whitespace-then-quotes
:identifier-key-regexp "^identifier\\s-*:"
:identifier-value-function denote-format-string-for-md-front-matter
:identifier-value-reverse-function denote-trim-whitespace-then-quotes
:date-key-regexp "^date\\s-*:"
:date-value-function denote-date-rfc3339
:date-value-reverse-function denote-extract-date-from-front-matter
:link-retrieval-format "(denote:%VALUE%)"
:link denote-md-link-format
:link-in-context-regexp denote-md-link-in-context-regexp)
(markdown-toml
:extension ".md"
:get-file-type-function denote-get-file-type-markdown-toml
:front-matter denote-toml-front-matter
:title-key-regexp "^title\\s-*="
:title-value-function denote-format-string-for-md-front-matter
:title-value-reverse-function denote-trim-whitespace-then-quotes
:keywords-key-regexp "^tags\\s-*="
:keywords-value-function denote-format-keywords-for-md-front-matter
:keywords-value-reverse-function denote-extract-keywords-from-front-matter
:signature-key-regexp "^signature\\s-*="
:signature-value-function denote-format-string-for-md-front-matter
:signature-value-reverse-function denote-trim-whitespace-then-quotes
:identifier-key-regexp "^identifier\\s-*="
:identifier-value-function denote-format-string-for-md-front-matter
:identifier-value-reverse-function denote-trim-whitespace-then-quotes
:date-key-regexp "^date\\s-*="
:date-value-function denote-date-rfc3339
:date-value-reverse-function denote-extract-date-from-front-matter
:link-retrieval-format "(denote:%VALUE%)"
:link denote-md-link-format
:link-in-context-regexp denote-md-link-in-context-regexp)
(text
:extension ".txt"
:get-file-type-function nil
:front-matter denote-text-front-matter
:title-key-regexp "^title\\s-*:"
:title-value-function denote-format-string-for-org-front-matter
:title-value-reverse-function denote-trim-whitespace
:keywords-key-regexp "^tags\\s-*:"
:keywords-value-function denote-format-keywords-for-text-front-matter
:keywords-value-reverse-function denote-extract-keywords-from-front-matter
:signature-key-regexp "^signature\\s-*:"
:signature-value-function denote-format-string-for-org-front-matter
:signature-value-reverse-function denote-trim-whitespace
:identifier-key-regexp "^identifier\\s-*:"
:identifier-value-function denote-format-string-for-org-front-matter
:identifier-value-reverse-function denote-trim-whitespace
:date-key-regexp "^date\\s-*:"
:date-value-function denote-date-iso-8601
:date-value-reverse-function denote-extract-date-from-front-matter
:link-retrieval-format "[denote:%VALUE%]"
:link denote-org-link-format
:link-in-context-regexp denote-org-link-in-context-regexp))
"Alist of variable `denote-file-type' and their format properties.
Each element is of the form (SYMBOL PROPERTY-LIST). SYMBOL is one of
those specified in the user option `denote-file-type' or an arbitrary
symbol that defines a new file type.
PROPERTY-LIST is a plist that consists of the following elements:
- `:extension' is a string with the file extension including the
period.
- `:get-file-type-function' a function with one parameter, a given file,
that reads the file contents and returns the file type as a symbol or
nil. If there is no function, Denote will fall back to a search for a
title in the front matter (per `:title-key-regexp', which is described
below).
- `:date-function' is a function that can format a date. See the
functions `denote-date-iso-8601', `denote-date-rfc3339', and
`denote-date-org-timestamp'.
- `:front-matter' is either a string passed to `format' or a
variable holding such a string. The `format' function accepts
four arguments, which come from `denote' in this order: TITLE,
DATE, KEYWORDS, IDENTIFIER. Read the docstring of `format' on
how to reorder arguments.
- `:title-key-regexp' is a regular expression that is used to
retrieve the title line in a file. The first line matching
this regexp is considered the title line.
- `:title-value-function' is the function used to format the raw
title string for inclusion in the front matter (e.g. to
surround it with quotes). Use the `identity' function if no
further processing is required.
- `:title-value-reverse-function' is the function used to
retrieve the raw title string from the front matter. It
performs the reverse of `:title-value-function'.
- `:keywords-key-regexp' is a regular expression used to retrieve
the keywords' line in the file. The first line matching this
regexp is considered the keywords' line.
- `:keywords-value-function' is the function used to format the
keywords' list of strings as a single string, with appropriate
delimiters, for inclusion in the front matter.
- `:keywords-value-reverse-function' is the function used to
retrieve the keywords' value from the front matter. It
performs the reverse of the `:keywords-value-function'.
- `:link-retrieval-format' is a string, or variable holding a string,
that specifies the retrieval format of a link.
- `:link' is a string, or variable holding a string, that
specifies the format of a link. See the variables
`denote-org-link-format', `denote-md-link-format'.
- `:link-in-context-regexp' is a regular expression that is used
to match the aforementioned link format. See the variables
`denote-org-link-in-context-regexp',`denote-md-link-in-context-regexp'.
If the user option `denote-file-type' is nil, use the first element of
this list for new note creation. The default is `org'.")