Function: denote-format-link
denote-format-link is a natively compiled function defined in
denote.el.
Signature
(denote-format-link FILE DESCRIPTION FILE-TYPE ID-ONLY)
Documentation
Prepare link to FILE using DESCRIPTION.
FILE-TYPE and ID-ONLY are used to get the format of the link.
See the :link property of denote-file-types.
Source Code
;; Defined in /nix/store/yld6spsps5sfn9w4rjyhkvqlvdgsmvpq-emacs-packages-deps/share/emacs/site-lisp/elpa/denote-4.2.3/denote.el
(defun denote-format-link (file description file-type id-only)
"Prepare link to FILE using DESCRIPTION.
FILE-TYPE and ID-ONLY are used to get the format of the link.
See the `:link' property of `denote-file-types'."
(format
(cond
((or id-only (null description) (string-empty-p description))
denote-id-only-link-format)
;; NOTE 2024-05-20: If there is no file type, we want to use the
;; Org format because it is still a usable link with the help of
;; the command `org-open-at-point-global'.
((null file-type)
(denote--link-format 'org))
(t
(denote--link-format file-type)))
(denote-retrieve-filename-identifier file)
description))