Function: hywiki-org-link-export
hywiki-org-link-export is an autoloaded and byte-compiled function
defined in hywiki.el.
Signature
(hywiki-org-link-export LINK DESCRIPTION FORMAT INFO)
Documentation
Export a HyWikiWord Org-format hy: link to various formats.
The LINK, DESCRIPTION, FORMAT and INFO are provided by the export backend.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
;;; Next two functions derived from the denote package.
;;;###autoload
(defun hywiki-org-link-export (link description format info)
"Export a HyWikiWord Org-format `hy:' link to various formats.
The LINK, DESCRIPTION, FORMAT and INFO are provided by the export
backend."
(let* ((path-word-suffix (hywiki-reference-to-referent link :full-data))
(path (when path-word-suffix
(file-relative-name (nth 0 path-word-suffix))))
(path-stem (when path
(file-name-sans-extension path)))
(word (nth 1 path-word-suffix))
(suffix (nth 2 path-word-suffix))
(desc (cond (description)
(suffix (when word
(format "%s%s" word suffix)))
(word)
(t ""))))
(if path
(pcase format
(`ascii (format "[%s] <%s:%s>" hywiki-org-link-type desc path))
(`html (hywiki--org-link-html-format path-stem suffix desc info))
(`latex (format "\\href{%s.latex}{%s}" (replace-regexp-in-string "[\\{}$%&_#~^]" "\\\\\\&" path-stem) desc))
(`md (format "[%s](%s.md%s)" desc path-stem
(hpath:spaces-to-dashes-markup-anchor
(or suffix ""))))
(`texinfo (format "@uref{%s.texi,%s}" path-stem desc))
(_ path))
link)))