Add: Heading matcher
This should also be easy to optimize with a buffer-wide regexp search.
This commit is contained in:
parent
5774880988
commit
6a9f5cc37c
1 changed files with 5 additions and 0 deletions
|
|
@ -172,6 +172,7 @@ If NARROW is non-nil, buffer will not be widened."
|
|||
(tags #'org-ql--tags-p)
|
||||
(property #'org-ql--property-p)
|
||||
(regexp #'org-ql--regexp-p)
|
||||
(heading #'org-ql--heading-p)
|
||||
(level #'org-ql--level-p)
|
||||
(org-back-to-heading #'outline-back-to-heading))
|
||||
(save-excursion
|
||||
|
|
@ -378,6 +379,10 @@ comparator, PRIORITY should be a priority string."
|
|||
(goto-char (line-beginning-position))
|
||||
(re-search-forward regexp end t))))
|
||||
|
||||
(defun org-ql--heading-p (regexp)
|
||||
"Return non-nil if current entry's heading matches REGEXP."
|
||||
(string-match regexp (org-get-heading 'no-tags 'no-todo)))
|
||||
|
||||
(defun org-ql--property-p (property &optional value)
|
||||
"Return non-nil if current entry has PROPERTY, and optionally VALUE."
|
||||
(pcase property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue