Query syntax in ancestors/parent predicate
- Ngôn ngữ chính
- Emacs Lisp
- Star
- 1.6k
- Fork
- 120
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I tried to use `ancestors` predicate to define custom predicate like the following:
```
(org-ql-defpred project ()
"Match a project - task with a todo subtask or :project: tag."
:body (or (tags-local "project")
(and
(todo)
(descendants `(and
(or (todo) (done))
(level < ,org-inlinetask-min-level))))))
(org-ql-defpred subproject ()
"Match a subproject"
:body (and (project)
(ancestors '(project))))
```
However, such definition failed when searching for `(subproject)` query.
Instead, I had to use non-intuitive definition:
```
(org-ql-defpred subproject ()
"Match a subproject"
:body (and (project)
(ancestors 'project)))
```
It is either a bug or I missed something in the documentation.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.