Function: org-roam-ref-read--completions
org-roam-ref-read--completions is a byte-compiled function defined in
org-roam-node.el.
Signature
(org-roam-ref-read--completions)
Documentation
Return an alist for ref completion.
The car is the ref, and the cdr is the corresponding node for the ref.
Source Code
;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-node.el
(defun org-roam-ref-read--completions ()
"Return an alist for ref completion.
The car is the ref, and the cdr is the corresponding node for the ref."
(let ((rows (org-roam-db-query
[:select [id ref type nodes:file pos title]
:from refs
:left-join nodes
:on (= refs:node-id nodes:id)])))
(cl-loop for row in rows
collect (pcase-let* ((`(,id ,ref ,type ,file ,pos ,title) row)
(node (org-roam-node-create :id id
:file file
:point pos
:title title)))
(cons
(concat (propertize ref 'node node 'type type)
(propertize id 'invisible t))
node)))))