(feat): add org-roam-find-file-immediate (#852)

Addresses #852.
master
Jethro Kuan 6 years ago committed by GitHub
parent 76b2ac3460
commit 220f395c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      org-roam.el

@ -1408,13 +1408,25 @@ If DESCRIPTION is provided, use this as the link label. See
"Find an Org-roam file, and insert a relative org link to it at point.
This variant of `org-roam-insert' inserts the link immediately by
using the template in `org-roam-capture-immediate-template'. The
interactive ARG and ARGS are forward to `org-roam-insert'.
interactive ARG and ARGS are passed to `org-roam-insert'.
See `org-roam-insert' for details."
(interactive "P")
(let ((args (push arg args))
(org-roam-capture-templates (list org-roam-capture-immediate-template)))
(apply #'org-roam-insert args)))
;;;###autoload
(defun org-roam-find-file-immediate (arg &rest args)
"Find and open an Org-roam file.
This variant of `org-roam-find-file' uses the template in
`org-roam-capture-immediate-template', avoiding the capture
process. The interactive ARG and ARGS are passed to
`org-roam-find-file'. See `org-roam-find-file' for details."
(interactive "P")
(let ((args (push arg args))
(org-roam-capture-templates (list org-roam-capture-immediate-template)))
(apply #'org-roam-find-file args)))
;;;###autoload
(defun org-roam-jump-to-index ()
"Find the index file in `org-roam-directory'.

Loading…
Cancel
Save