From 30b2e97426f4bc01c8dcf4fbfcc848441d7c44d9 Mon Sep 17 00:00:00 2001 From: lld2001 <1353647436@qq.com> Date: Sun, 16 Aug 2020 06:51:37 -0500 Subject: [PATCH] (feat): add org-capture interactive options to org-roam-capture (#1035) --- org-roam-capture.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/org-roam-capture.el b/org-roam-capture.el index 45a300f..956698d 100644 --- a/org-roam-capture.el +++ b/org-roam-capture.el @@ -526,10 +526,11 @@ GOTO and KEYS argument have the same functionality as (funcall-interactively org-roam-capture-function)))) ;;;###autoload -(defun org-roam-capture () +(defun org-roam-capture (&optional goto keys) "Launches an `org-capture' process for a new or existing note. -This uses the templates defined at `org-roam-capture-templates'." - (interactive) +This uses the templates defined at `org-roam-capture-templates'. +Arguments GOTO and KEYS see `org-capture'." + (interactive "P") (unless org-roam-mode (org-roam-mode)) (let* ((completions (org-roam--get-title-path-completions)) (title-with-keys (org-roam-completion--completing-read "File: " @@ -542,7 +543,7 @@ This uses the templates defined at `org-roam-capture-templates'." (cons 'file file-path))) (org-roam-capture--context 'capture)) (condition-case err - (org-roam-capture--capture) + (org-roam-capture--capture goto keys) (error (user-error "%s. Please adjust `org-roam-capture-templates'" (error-message-string err)))))))