Function: denote-query-extract-title

denote-query-extract-title is a byte-compiled function defined in denote.el.

Signature

(denote-query-extract-title FILE)

Documentation

Extract note title from FILE front matter.

When no title is found, return title found in FILE name.

When that doesn't work, return denote-query-untitled-string.

Intended to be used as denote-query-format-heading-function.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-query-extract-title (file)
  "Extract note title from FILE front matter.

When no title is found, return title found in FILE name.

When that doesn't work, return `denote-query-untitled-string'.

Intended to be used as `denote-query-format-heading-function'."
  (if-let* ((type (denote-filetype-heuristics file))
            (title (denote-retrieve-title-or-filename file type))
            (_ (not (string-blank-p title))))
      title
    denote-query-untitled-string))