Function: org-roam-buffer-file-at-point

org-roam-buffer-file-at-point is a byte-compiled function defined in org-roam-mode.el.

Signature

(org-roam-buffer-file-at-point &optional ASSERT)

Documentation

Return the file at point in the current org-roam-mode based buffer.

If ASSERT, throw an error.

Source Code

;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-mode.el
(defun org-roam-buffer-file-at-point (&optional assert)
  "Return the file at point in the current `org-roam-mode' based buffer.
If ASSERT, throw an error."
  (if-let* ((file (magit-section-case
                    (org-roam-node-section (org-roam-node-file (oref it node)))
                    (org-roam-grep-section (oref it file))
                    (org-roam-preview-section (oref it file))
                    (t (cl-assert (derived-mode-p 'org-roam-mode))))))
      file
    (when assert
      (user-error "No file at point"))))