Function: hywiki-get-referent
hywiki-get-referent is a byte-compiled function defined in hywiki.el.
Signature
(hywiki-get-referent WIKIWORD)
Documentation
Return the referent of HyWiki WIKIWORD or nil if it does not exist.
If it is a pathname, expand it relative to hywiki-directory.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-get-referent (wikiword)
"Return the referent of HyWiki WIKIWORD or nil if it does not exist.
If it is a pathname, expand it relative to `hywiki-directory'."
(when (and (stringp wikiword) (not (string-empty-p wikiword))
(string-match hywiki-word-with-optional-suffix-exact-regexp wikiword))
(let* ((suffix (cond ((match-beginning 2)
(prog1 (substring wikiword (match-beginning 2))
;; Remove any #section suffix in `wikiword'.
(setq wikiword (match-string-no-properties 1 wikiword))))
((match-beginning 3)
(prog1 (substring wikiword (match-beginning 3))
;; Remove any :Lnum:Cnum suffix in `wikiword'.
(setq wikiword (match-string-no-properties
1 wikiword))))))
(referent (hash-get (hywiki-get-singular-wikiword wikiword)
(hywiki-get-referent-hasht))))
;; If a referent type that can include a # or :L line
;; number suffix, append it to the referent-value.
(setq referent (hywiki--add-suffix-to-referent suffix referent)))))