From 50fab59fece7a837cd69a396a287f90baf019646 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 19 Nov 2018 03:24:33 -0600 Subject: [PATCH] Change: Simplify a pcase --- org-ql.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/org-ql.el b/org-ql.el index c2c490c..efe3613 100644 --- a/org-ql.el +++ b/org-ql.el @@ -281,13 +281,13 @@ With COMPARATOR and TARGET-DATE, return non-nil if entry's scheduled date compares with TARGET-DATE according to COMPARATOR. TARGET-DATE may be a string like \"2017-08-05\", or an integer like one returned by `date-to-day'." - (when-let ((timestamp (pcase type - ;; FIXME: Add :date selector, since I put it - ;; in the examples but forgot to actually - ;; make it. - (:deadline (org-entry-get (point) "DEADLINE")) - (:scheduled (org-entry-get (point) "SCHEDULED")) - (:closed (org-entry-get (point) "CLOSED")))) + (when-let (;; FIXME: Add :date selector, since I put it + ;; in the examples but forgot to actually + ;; make it. + (timestamp (org-entry-get (point) (pcase type + (:deadline "DEADLINE") + (:scheduled "SCHEDULED") + (:closed "CLOSED")))) (date-element (with-temp-buffer ;; FIXME: Hack: since we're using ;; (org-element-property :type date-element)