Function: hywiki-references-to-org-links
hywiki-references-to-org-links is a byte-compiled function defined in
hywiki.el.
Signature
(hywiki-references-to-org-links)
Documentation
Convert all highlighted HyWikiWords in current buffer to Org links.
Org publishing is then used to convert HyWiki files to other formats such as html.
For example, the reference:
"WikiWord#Multi-Word Section"
is converted to:
"[[hy:WikiWord#Multi-Word Section]]".
If the reference is within the WikiWord page to which it refers, it
simplifies to:
"[[Multi-Word Section]]".
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-references-to-org-links ()
"Convert all highlighted HyWikiWords in current buffer to Org links.
Org publishing is then used to convert HyWiki files to other formats such
as html.
For example, the reference:
\"WikiWord#Multi-Word Section\"
is converted to:
\"[[hy:WikiWord#Multi-Word Section]]\".
If the reference is within the WikiWord page to which it refers, it
simplifies to:
\"[[Multi-Word Section]]\"."
(barf-if-buffer-read-only)
;; Need to be explicit about the region here so does not use markers
;; from a region pointing to another buffer
(hywiki-maybe-highlight-references (point-min) (point-max))
(let ((make-index (hywiki-org-get-publish-property :makeindex))
org-link
wikiword-and-section
wikiword)
(hywiki-map-words
(lambda (overlay)
(setq wikiword-and-section
(buffer-substring-no-properties
(overlay-start overlay)
(overlay-end overlay)))
(goto-char (overlay-start overlay))
(delete-region (overlay-start overlay)
(overlay-end overlay))
(delete-overlay overlay)
(if (setq org-link (hywiki-reference-to-org-link wikiword-and-section nil))
(insert org-link)
(message
"(hywiki-references-to-org-links): \"%s\" in \"%s\" produced nil org link output"
wikiword-and-section (buffer-name)))
(when make-index
(when (string-match (concat hywiki-org-link-type ":")
wikiword-and-section)
(setq wikiword (substring wikiword-and-section (match-end 0))))
(insert "\n#+INDEX: " wikiword "\n"))))))