From 467b165678a2d2cf7fd06365b03b72beae43ad45 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Thu, 8 Apr 2021 22:30:28 +0800 Subject: [PATCH] fix org-roam-capture --- org-roam-capture.el | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/org-roam-capture.el b/org-roam-capture.el index 2a670b4..6d520d1 100644 --- a/org-roam-capture.el +++ b/org-roam-capture.el @@ -541,17 +541,13 @@ This uses the templates defined at `org-roam-capture-templates'. Arguments GOTO and KEYS see `org-capture'." (interactive "P") (let ((node (org-roam-node-read))) - ;; TODO: fix this - (if (org-roam-node-id node) - (condition-case err - (org-roam-capture--capture goto keys - :info `((title . ,(org-roam-node-title node)) - (slug . ,(funcall org-roam-title-to-slug-function - (org-roam-node-title node))) - (file . ,(org-roam-node-file node))) - :context 'capture) - (error (user-error "%s. Please adjust `org-roam-capture-templates'" - (error-message-string err))))))) + (org-roam-capture--capture :goto goto + :keys keys + :info `((title . ,(org-roam-node-title node)) + (slug . ,(funcall org-roam-title-to-slug-function + (org-roam-node-title node))) + (file . ,(org-roam-node-file node))) + :context 'capture))) (provide 'org-roam-capture)