Function: org-roam-node-at-point
org-roam-node-at-point is a byte-compiled function defined in
org-roam-node.el.
Signature
(org-roam-node-at-point &optional ASSERT)
Documentation
Return the node at point.
If ASSERT, throw an error if there is no node at point. This function also returns the node if it has yet to be cached in the database. In this scenario, only expect :id and :point to be populated.
Source Code
;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-node.el
;;; Nodes
;;;; Getters
(defun org-roam-node-at-point (&optional assert)
"Return the node at point.
If ASSERT, throw an error if there is no node at point.
This function also returns the node if it has yet to be cached in the
database. In this scenario, only expect `:id' and `:point' to be
populated."
(or (magit-section-case
(org-roam-node-section (oref it node))
(org-roam-preview-section (save-excursion
(magit-section-up)
(org-roam-node-at-point)))
(t (org-with-wide-buffer
(while (not (or (org-roam-db-node-p)
(bobp)
(eq (funcall outline-level)
(save-excursion
(org-roam-up-heading-or-point-min)
(funcall outline-level)))))
(org-roam-up-heading-or-point-min))
(when-let* ((id (org-id-get)))
(org-roam-populate
(org-roam-node-create
:id id
:point (point)))))))
(and assert (user-error "No node at point"))))