Function: hbdata:search

hbdata:search is a byte-compiled function defined in hbdata.el.

Signature

(hbdata:search BUF LABEL PARTIAL)

Documentation

Go to Hyperbole hbdata BUF and find LABEL whole or PARTIAL match.

Search is case-insensitive. Return list with elements:
(<button-src> <label-key1> ... <label-keyN>).

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbdata.el
(defun hbdata:search (buf label partial)
  "Go to Hyperbole hbdata BUF and find LABEL whole or PARTIAL match.
Search is case-insensitive.  Return list with elements:
\(<button-src> <label-key1> ... <label-keyN>)."
  (set-buffer buf)
  (let ((case-fold-search t) (src-matches) (src) (matches) (end))
    (goto-char (point-min))
    (while (re-search-forward "^\^L\n\"\\([^\"]+\\)\"" nil t)
      (setq src (match-string 1)
	    matches nil)
      (save-excursion
	(setq end (if (re-search-forward "^\^L" nil t)
		      (1- (point)) (point-max))))
      (while (re-search-forward
	      (concat "^(\"\\(" (if partial "[^\"]*")
		      (regexp-quote (ebut:label-to-key label))
		      (if partial "[^\"]*") "\\)\"") nil t)
	(setq matches (cons (match-string 1) matches)))
      (if matches
	  (setq src-matches (cons (cons src matches) src-matches)))
      (goto-char end))
    src-matches))