Comment: Add tasks
This commit is contained in:
parent
e48cdf7143
commit
3003eb8ad4
1 changed files with 5 additions and 0 deletions
|
|
@ -941,6 +941,9 @@ Arguments STRING, POS, FILL, and LEVEL are according to
|
||||||
(when (org-goto-first-child)
|
(when (org-goto-first-child)
|
||||||
;; Lisp makes this easy and elegant: all we do is modify the query,
|
;; Lisp makes this easy and elegant: all we do is modify the query,
|
||||||
;; nesting it inside an (and), and it doesn't descend into grandchildren.
|
;; nesting it inside an (and), and it doesn't descend into grandchildren.
|
||||||
|
|
||||||
|
;; TODO: However, this could probably be rewritten like the `ancestors' predicate,
|
||||||
|
;; which avoids calling `org-ql-select' recursively and its associated overhead.
|
||||||
(let* ((level (org-current-level))
|
(let* ((level (org-current-level))
|
||||||
(query (cl-typecase query
|
(query (cl-typecase query
|
||||||
(byte-code-function `(and (level ,level)
|
(byte-code-function `(and (level ,level)
|
||||||
|
|
@ -962,6 +965,8 @@ Arguments STRING, POS, FILL, and LEVEL are according to
|
||||||
|
|
||||||
(org-ql--defpred descendants (query)
|
(org-ql--defpred descendants (query)
|
||||||
"Return non-nil if current entry has descendants matching QUERY."
|
"Return non-nil if current entry has descendants matching QUERY."
|
||||||
|
;; TODO: This could probably be rewritten like the `ancestors' predicate,
|
||||||
|
;; which avoids calling `org-ql-select' recursively and its associated overhead.
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
(org-narrow-to-subtree)
|
(org-narrow-to-subtree)
|
||||||
(when (org-goto-first-child)
|
(when (org-goto-first-child)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue