Function: ibut:list
ibut:list is an interactive and byte-compiled function defined in
hbut.el.
Signature
(ibut:list &optional FILE LOC-P)
Documentation
Return list of labels of named ibuts in FILE or the current buffer.
Remove duplicate labels if optional LOC-P is omitted. With LOC-P, return list of elements (label start end) where start and end are the buffer positions at which the button label delimiter begins and ends.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun ibut:list (&optional file loc-p)
"Return list of labels of named ibuts in FILE or the current buffer.
Remove duplicate labels if optional LOC-P is omitted. With LOC-P, return
list of elements (label start end) where start and end are the buffer
positions at which the button label delimiter begins and ends."
(interactive)
(setq file (if file
(when (file-exists-p file)
(find-file-noselect file))
(current-buffer)))
(when file
(set-buffer file)
(let ((buts (ibut:map (if loc-p
(lambda (lbl start end)
;; Normalize label spacing
(list (ibut:key-to-label (ibut:label-to-key lbl))
start end))
(lambda (lbl _start _end)
;; Normalize label spacing
(ibut:key-to-label (ibut:label-to-key lbl)))))))
(if loc-p buts (when buts (apply #'set:create buts))))))