Change: (heading) Match all regexps
This makes more sense and should be more useful.
This commit is contained in:
parent
f6bd02b355
commit
2f9a7ab6b7
2 changed files with 4 additions and 4 deletions
|
|
@ -903,10 +903,10 @@ priority."
|
|||
(re-search-forward regexp end t))))))
|
||||
|
||||
(org-ql--defpred heading (&rest regexps)
|
||||
"Return non-nil if current entry's heading matches any of REGEXPS (regexp strings)."
|
||||
"Return non-nil if current entry's heading matches all REGEXPS (regexp strings)."
|
||||
;; TODO: In Org 9.2+, `org-get-heading' takes 2 more arguments.
|
||||
(let ((heading (org-get-heading 'no-tags 'no-todo)))
|
||||
(--any (string-match it heading) regexps)))
|
||||
(--all? (string-match it heading) regexps)))
|
||||
|
||||
(org-ql--defpred property (property &optional value)
|
||||
"Return non-nil if current entry has PROPERTY (a string), and optionally VALUE (a string)."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue