Function: org-roam-preview-visit
org-roam-preview-visit is an interactive and byte-compiled function
defined in org-roam-mode.el.
Signature
(org-roam-preview-visit FILE POINT &optional OTHER-WINDOW)
Documentation
Visit FILE at POINT and return the visited buffer.
With OTHER-WINDOW non-nil do so in another window.
In interactive calls OTHER-WINDOW is set with
universal-argument.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-mode.el
(defun org-roam-preview-visit (file point &optional other-window)
"Visit FILE at POINT and return the visited buffer.
With OTHER-WINDOW non-nil do so in another window.
In interactive calls OTHER-WINDOW is set with
`universal-argument'."
(interactive (list (org-roam-buffer-file-at-point 'assert)
(oref (magit-current-section) point)
current-prefix-arg))
(let ((buf (find-file-noselect file))
(display-buffer-fn (if other-window
#'switch-to-buffer-other-window
#'pop-to-buffer-same-window)))
(funcall display-buffer-fn buf)
(with-current-buffer buf
(widen)
(goto-char point))
(when (org-invisible-p) (org-fold-show-context))
buf))