Closed failable closed 4 years ago
The :auto-
selectors can't be combined with other selectors, because they expand internally to multiple groups at runtime, e.g. one for each parent item.
You may find org-ql
helpful in writing more advanced queries.
Thanks for the quick reply.
they expand internally to multiple groups at runtime, e.g. one for each parent item.
I guessed so. But why the behavior different when :deadline is removed?
The strange part to me is, if the :deadline part is removed, Parent 2 appears.
—————————— Under some selecting criteria, I want make groups for items that have parents and leave items that have no parents as a single group. Can I achieve this without using org-ql? Should I only use :auto-parent as the last selector? Thanks.
Thanks for the quick reply.
they expand internally to multiple groups at runtime, e.g. one for each parent item.
I guessed so. But why the behavior different when :deadline is removed?
I don't know. It's not intended to be used that way.
The strange part to me is, if the :deadline part is removed, Parent 2 appears.
—————————— Under some selecting criteria, I want make groups for items that have parents and leave items that have no parents as a single group.
That's what will happen if you use '((:auto-parent t))
.
Should I only use :auto-parent as the last selector?
That depends on what you want to achieve. As the documentation says, groups consume items, and ones that are not matched fall through to later selectors.
It seems no selection should be performed when using auto selectors, e.g. select anything that has deadline this month and group them.
I don't understand what you mean.
Say there's a
test.org
containingParent 2
is missing in the result of the following scripti.e.
The strange part to me is, if the
:deadline
part is removed,Parent 2
appears.Will items that have no parent get filtered in the selectors that near
:auto-parent
? Is:auto-parent
designed to be work with any other selector? I guess some like:name
is meaningless to it. Thanks.