Function: hbdata:to-entry

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

Signature

(hbdata:to-entry BUT-KEY KEY-SRC &optional DIRECTORY INSTANCE)

Documentation

Return button data entry indexed by BUT-KEY, KEY-SRC, optional DIRECTORY.

Return nil if entry is not found. Leave point at start of entry when successful or where entry should be inserted if unsuccessful. A button entry is a list. Use methods from class hbdata to operate on the entry. Optional INSTANCE non-nil means search for any button instance matching but-key.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbdata.el
(defun hbdata:to-entry (but-key key-src &optional directory instance)
  "Return button data entry indexed by BUT-KEY, KEY-SRC, optional DIRECTORY.
Return nil if entry is not found.  Leave point at start of entry when
successful or where entry should be inserted if unsuccessful.
A button entry is a list.  Use methods from class `hbdata' to operate on the
entry.  Optional INSTANCE non-nil means search for any button instance matching
but-key."
  (let ((pos-entry-cons
	 (hbdata:apply-entry
	  (lambda ()
	    (beginning-of-line)
	    (cons (point) (read (current-buffer))))
	  but-key key-src directory 'create instance)))
    (hbdata:to-entry-buf key-src directory)
    (forward-line 1)
    (when pos-entry-cons
      (goto-char (car pos-entry-cons))
      (cdr pos-entry-cons))))