Function: kcell-view:reference

kcell-view:reference is a byte-compiled function defined in kview.el.

Signature

(kcell-view:reference &optional POS RELATIVE-DIR)

Documentation

Return a klink to kcell at optional POS or point; return nil if not in a kcell.

The reference is a string of the form, "<kcell-file, cell-ref>" where cell-ref is as described in the documentation for kcell:ref-to-id. Kcell-file is made relative to optional RELATIVE-DIR (or default-directory if RELATIVE-DIR is not given or is nil), before it is returned.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kcell-view:reference (&optional pos relative-dir)
  "Return a klink to kcell at optional POS or point; return nil if not in a kcell.
The reference is a string of the form, \"<kcell-file, cell-ref>\"
where cell-ref is as described in the documentation for
`kcell:ref-to-id'.  Kcell-file is made relative to optional
RELATIVE-DIR (or `default-directory' if RELATIVE-DIR is not given
or is nil), before it is returned."
  (when (derived-mode-p 'kotl-mode)
    (klink:set-yank-handler
     (format "<%s, %s=%s>" (hpath:relative-to (hypb:buffer-file-name) relative-dir)
	     (kcell-view:label pos) (kcell-view:idstamp pos)))))