Change: (--query-preamble) Add (level) preamble

This commit is contained in:
Adam Porter 2019-07-20 18:17:17 -05:00
parent b1b04b3f19
commit 0fdfa65bef
2 changed files with 30 additions and 0 deletions

View file

@ -282,6 +282,10 @@ replace the clause with a preamble."
(setq org-ql-preamble regexp)
;; Return nil
nil))
(`(level ,num)
(let* ((regexp (rx-to-string `(seq bol (repeat ,num "*") " "))))
(setq org-ql-preamble regexp)
nil))
(`(and . ,rest)
(let ((clauses (mapcar #'rec rest)))
`(and ,@(-non-nil clauses))))