From 06d0db736ac894400ae1e0ccf8e8f16c7e3e097d Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Tue, 24 Nov 2020 21:09:28 +0800 Subject: [PATCH] (internal): remove error-checking for olp (#1326) The `org-roam-capture-find-or-create-olp` function will throw the same error, so we don't have to explicitly catch and throw. --- org-roam-capture.el | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/org-roam-capture.el b/org-roam-capture.el index 68e8a23..a231666 100644 --- a/org-roam-capture.el +++ b/org-roam-capture.el @@ -529,14 +529,7 @@ This function is used solely in Org-roam's capture templates: see (org-roam-capture--put prop val))) (set-buffer (org-capture-target-buffer file-path)) (widen) - (if-let* ((olp (--> (org-roam-capture--get :olp) - (pcase it - ((pred listp) - it) - (wrong-type - (signal 'wrong-type-argument - `((stringp listp) - ,wrong-type))))))) + (if-let* ((olp (org-roam-capture--get :olp))) (condition-case err (when-let ((marker (org-roam-capture-find-or-create-olp olp))) (goto-char marker)