Add: (deadline) preamble

This commit is contained in:
Adam Porter 2019-08-09 17:05:17 -05:00
parent e7eb3b2031
commit ed26effe1c
2 changed files with 35 additions and 0 deletions

View file

@ -316,6 +316,15 @@ replace the clause with a preamble."
element)
(pcase element
(`(or _) element)
(`(deadline . ,_)
(setq org-ql-preamble
(rx-to-string `(seq bol (0+ (any " ")) "DEADLINE" ":" (1+ space) (1+ not-newline)) t))
;; Return element, because the predicate still needs testing.
element)
(`(deadline)
(setq org-ql-preamble (rx-to-string `(seq bol (0+ (any " ")) "DEADLINE" ":") t))
;; Return element, because the predicate still needs testing.
element)
(`(regexp . ,regexps)
(setq org-ql-preamble (rx-to-string `(or ,@regexps) t))
;; Return nil, because we don't need to test the predicate.