Function: actypes::annot-bib

actypes::annot-bib is an interactive and byte-compiled function defined in hactypes.el.

Signature

(actypes::annot-bib KEY)

Documentation

Follow internal ref KEY within an annotated bibliography, delimiters=[].

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hactypes.el
;;; ************************************************************************
;;; Standard Hyperbole action types
;;; ************************************************************************

(defact annot-bib (key)
  "Follow internal ref KEY within an annotated bibliography, delimiters=[]."
  (interactive "sReference key (no []): ")
  (let* ((key-regexp (concat "^[*]*[ \t]*\\[" (ebut:key-to-label key) "\\]"))
	 (lbl-start (hattr:get 'hbut:current 'lbl-start))
	 (lbl-end (hattr:get 'hbut:current 'lbl-end))
	 (citation (when (and lbl-start lbl-end)
		     (save-excursion
		       (goto-char (point-max))
                       (and (re-search-backward key-regexp nil t)
			    (or (< (point) (1- lbl-start))
				(> (point) (1+ lbl-end)))
			    (point))))))
    (if citation
	(progn (hpath:display-buffer (current-buffer))
	       (goto-char citation)
	       (beginning-of-line))
      (beep))))