Function: org-roam-buffer-p

org-roam-buffer-p is a natively compiled function defined in org-roam.el.

Signature

(org-roam-buffer-p &optional BUFFER)

Documentation

Return t if BUFFER is for an Org-roam file.

If BUFFER is not specified, use the current buffer.

Source Code

;; Defined in /nix/store/60hpqw2cczhjli65ml5v1p4g0q2kbyhb-emacs-packages-deps/share/emacs/site-lisp/elpa/org-roam-20260425.1623/org-roam.el
(defun org-roam-buffer-p (&optional buffer)
  "Return t if BUFFER is for an Org-roam file.
If BUFFER is not specified, use the current buffer."
  (let ((buffer (or buffer (current-buffer)))
        path)
    (with-current-buffer buffer
      (and (derived-mode-p 'org-mode)
           (setq path (buffer-file-name (buffer-base-buffer)))
           (org-roam-file-p path)))))