Add: ts preambles
This commit is contained in:
parent
4954789ca5
commit
a425c45afd
2 changed files with 160 additions and 0 deletions
|
|
@ -403,6 +403,15 @@ replace the clause with a preamble."
|
|||
t))
|
||||
;; Return nil, because we don't need to test the predicate.
|
||||
nil)
|
||||
(`(ts . ,rest)
|
||||
(setq org-ql-preamble (pcase (plist-get rest :type)
|
||||
((or 'nil 'both) org-tsr-regexp-both)
|
||||
('active org-tsr-regexp)
|
||||
('inactive org-ql-tsr-regexp-inactive)))
|
||||
;; Predicate needs testing only when args are present.
|
||||
(-let (((&keys :from :to :on) rest))
|
||||
(when (or from to on)
|
||||
element)))
|
||||
(`(and . ,rest)
|
||||
(let ((clauses (mapcar #'rec rest)))
|
||||
`(and ,@(-non-nil clauses))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue