Function: klink:set-yank-handler

klink:set-yank-handler is a byte-compiled function defined in klink.el.

Signature

(klink:set-yank-handler KLINK)

Documentation

Add yank-handler to KLINK and return the modified KLINK.

Link is made relative when yanked into the same koutline or the same directory.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klink.el
(defun klink:set-yank-handler (klink)
  "Add yank-handler to KLINK and return the modified KLINK.
Link is made relative when yanked into the same koutline or the
same directory."
  (add-text-properties
   0 (length klink)
   (list 'file-name buffer-file-name
	 'yank-handler '(klink:yank-handler)
	 'yank-excluded-properties (cons 'yank-handler (get-text-property 0 'yank-excluded-properties klink))
	 ;; Prevent klink text properties from being sticky/inherited by
	 ;; neighboring text.
	 'rear-nonsticky '(file-name yank-handler yank-excluded-properties))
   klink)
  klink)