Function: org-roam-graph--open

org-roam-graph--open is a byte-compiled function defined in org-roam-graph.el.

Signature

(org-roam-graph--open FILE)

Documentation

Open FILE using org-roam-graph-viewer with view-file as a fallback.

Source Code

;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-graph.el
(defun org-roam-graph--open (file)
  "Open FILE using `org-roam-graph-viewer' with `view-file' as a fallback."
  (pcase org-roam-graph-viewer
    ((pred stringp)
     (if (executable-find org-roam-graph-viewer)
         (condition-case err
             (call-process org-roam-graph-viewer nil 0 nil file)
           (error (user-error "Failed to open org-roam graph: %s" err)))
       (user-error "Executable not found: \"%s\"" org-roam-graph-viewer)))
    ((pred functionp) (funcall org-roam-graph-viewer file))
    ('nil (view-file file))
    (_ (signal 'wrong-type-argument `((functionp stringp null) ,org-roam-graph-viewer)))))