Change: Simplify a pcase
This commit is contained in:
parent
df5d5e2387
commit
50fab59fec
1 changed files with 7 additions and 7 deletions
10
org-ql.el
10
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
|
||||
(when-let (;; 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"))))
|
||||
(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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue