Function: ibut:to-name
ibut:to-name is a byte-compiled function defined in hbut.el.
Signature
(ibut:to-name LBL-KEY)
Documentation
Move to the name of the nearest named implicit button matching LBL-KEY.
Find the nearest implicit button with LBL-KEY (a label or label key), within the visible portion of the current buffer and move to the start of its delimited button name (after opening delimiter). This will find an implicit button if point is within its name or text or if LBL-KEY is a name/name-key of an existing implicit button. It will not find other unnamed implicit buttons.
Return the symbol for the button if found, else nil.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun ibut:to-name (lbl-key)
"Move to the name of the nearest named implicit button matching LBL-KEY.
Find the nearest implicit button with LBL-KEY (a label or label
key), within the visible portion of the current buffer and move
to the start of its delimited button name (after opening
delimiter). This will find an implicit button if point is within
its name or text or if LBL-KEY is a name/name-key of an existing
implicit button. It will not find other unnamed implicit
buttons.
Return the symbol for the button if found, else nil."
(unless lbl-key
(setq lbl-key (ibut:label-p nil nil nil nil t)))
(hbut:funcall
(lambda (lbl-key _buffer _key-src)
(let* ((name-start-end (ibut:label-p nil nil nil t t))
(name-start (nth 1 name-start-end))
(at-name (car name-start-end))
(at-text-key (ibut:label-p nil "\"" "\"" nil t))
ibut)
(cond ((or (and at-name (equal at-name lbl-key))
(and lbl-key (equal at-text-key lbl-key)))
(setq ibut 'hbut:current))
((and lbl-key (setq ibut (ibut:to lbl-key)))))
;; Skip past any optional name and separators
(cond (name-start
(goto-char name-start)
(skip-chars-forward (regexp-quote ibut:label-start)))
((ibut:at-to-name-p ibut)))
ibut))
lbl-key
(current-buffer)))