Function: klink:update-label
klink:update-label is a byte-compiled function defined in klink.el.
Signature
(klink:update-label KLINK SRC-START SRC-BUF)
Documentation
Update label of KLINK if its relative cell id has changed.
Assume point is in klink referent buffer, where the klink points. SRC-START is the start of the KLINK reference in the SRC-BUF.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20261030.2317/kotl/klink.el
(defun klink:update-label (klink src-start src-buf)
"Update label of KLINK if its relative cell id has changed.
Assume point is in klink referent buffer, where the klink points.
SRC-START is the start of the KLINK reference in the SRC-BUF."
(and (stringp klink)
(string-match "[#@,]\\s-*\\([*0-9][*.0-9a-zA-Z]*\\)\\s-*=\\s-*0[0-9]*"
klink)
;; Then klink has both relative and permanent ids.
(let* ((label (match-string 1 klink))
(new-label (kcell-view:label)))
(and new-label (not (equal label new-label))
(klink:replace-label klink src-buf src-start new-label)))))