Function: hywiki-referent-exists-p
hywiki-referent-exists-p is a byte-compiled function defined in
hywiki.el.
Signature
(hywiki-referent-exists-p &optional REF START END)
Documentation
Return the HyWiki reference at point or optional REF, if has a referent.
If no such referent exists, return nil.
The HyWikiWord reference may be of the form:
1. HyWikiWord#section with an optional #section.
2. If REF is the symbol, :range, and there is a HyWikiWord at point
with an existing referent, return the tuple of values: ='(<ref>
<ref-start> <ref-end>) instead of the reference alone; otherwise,
return the tuple ='(nil nil nil).
When using the reference at point, a call to
hywiki-active-in-current-buffer-p at point must return non-nil or this
function will return nil.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-referent-exists-p (&optional ref start end)
"Return the HyWiki reference at point or optional REF, if has a referent.
If no such referent exists, return nil.
The HyWikiWord reference may be of the form:
1. HyWikiWord#section with an optional #section.
2. If REF is the symbol, :range, and there is a HyWikiWord at point
with an existing referent, return the tuple of values: \='(<ref>
<ref-start> <ref-end>) instead of the reference alone; otherwise,
return the tuple \='(nil nil nil).
When using the reference at point, a call to
`hywiki-active-in-current-buffer-p' at point must return non-nil or this
function will return nil."
(let ((save-input-word ref))
(when (stringp ref)
(setq ref (hywiki-strip-org-link ref)))
(if (or (stringp ref)
(setq ref (hywiki-word-get-range)))
(unless (hywiki-get-referent (if (stringp ref) ref (nth 0 ref)))
(setq ref nil))
(setq ref nil))
(when (and (listp ref) (= (length ref) 3))
(setq start (nth 1 ref)
end (nth 2 ref)
;; `ref' must be set last so list version can be referenced
;; first above
ref (nth 0 ref)))
(if (eq save-input-word :range)
(list ref start end)
ref)))