Function: klink:act

klink:act is a byte-compiled function defined in klink.el.

Signature

(klink:act KLINK START-POS)

Documentation

Update relative part of KLINK at START-POS if it has moved and jump to KLINK.

See actypes::link-to-kotl for valid KLINK formats.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klink.el
;;; ************************************************************************
;;; Private functions
;;; ************************************************************************

(defun klink:act (klink start-pos)
  "Update relative part of KLINK at START-POS if it has moved and jump to KLINK.

See `actypes::link-to-kotl' for valid KLINK formats."
  (let ((obuf (current-buffer)))
    ;; Perform klink's action which is to jump to klink referent.
    (prog1 (hact 'link-to-kotl klink)
      (when (derived-mode-p 'kotl-mode)
	(save-excursion
	  ;; Update klink label if need be, which might be in a different buffer
	  ;; than the current one.
	  (klink:update-label klink start-pos obuf))))))