Morgan Smith <[email protected]> writes:

> First of all, the scope is the entire tree is question.  Not really sure
> where the "sub" comes from.  Although I think it's somewhat common in
> the Org repo to use "tree" and "subtree" interchangeably.  This has also
> been a source of confusion for me :P

I had the same confusion with “tree” and “subtree” at first. Eventually
I understood it as: “tree” is the whole outline structure of the file,
while a “subtree” is a single heading together with all its subheadings.

As far as I can tell, the manual never defines this explicitly. In “2.1
Headlines” it only says that headlines define the structure of an
outline tree, and “subtree” then shows up mostly in command names and
descriptions (org-cut-subtree, org-narrow-to-subtree, subtree cycling,
etc.). The “Sparse Trees” section also uses “tree” in the sense of the
whole document.

Maybe it would be worth adding a short clarification of both terms to
the manual.

> I really think the word recursion describes this and (sub)tree does not.

I agree that “recursion” describes what happens under the hood. But I
think the documentation should describe what the user gets, not how it’s
computed. From the user’s point of view, the question is simply: does
the cookie count only children, or everything below it?

That’s why I’d like to propose, in a later patch, accepting “subtree” in
COOKIE_DATA, while keeping “recursive” working as an alias so existing
files don’t break.

Best,
-- 
Slawomir Grochowski

Reply via email to