Function: denote-link-ol-follow
denote-link-ol-follow is an autoloaded and byte-compiled function
defined in denote.el.
Signature
(denote-link-ol-follow LINK)
Documentation
Find file of type denote: matching LINK.
LINK is the identifier of the note, optionally followed by a file search
option akin to that of standard Org file: link types. Read Info
node (org) Query Options.
If LINK is not an identifier, then it is not pointing to a file but to a
query of file contents or file names (see the commands
denote-query-contents-link and denote-query-filenames-link).
Uses the function denote-directory(var)/denote-directory(fun) to establish the path to the file.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;;;###autoload
(defun denote-link-ol-follow (link)
"Find file of type `denote:' matching LINK.
LINK is the identifier of the note, optionally followed by a file search
option akin to that of standard Org `file:' link types. Read Info
node `(org) Query Options'.
If LINK is not an identifier, then it is not pointing to a file but to a
query of file contents or file names (see the commands
`denote-query-contents-link' and `denote-query-filenames-link').
Uses the function `denote-directory' to establish the path to the file."
(if-let* ((match (denote-link--ol-resolve-link-to-target link))
(_ (file-exists-p (string-trim-right match "::.*"))))
(org-link-open-as-file match nil)
(denote--act-on-query-link match)))