Slawomir Grochowski <[email protected]> writes:

> Given that Ihor is already comfortable with "subtree" / "Xs", and the
> hierarchy is preserved in the view, how does this sound to you? Are you
> happy to go ahead with "subtree" and "Xs"?

It might be nice to see what Ihor has to say about the current state of
this discussion but I'm pretty sure they are quite busy at the moment.

> Morgan Smith <[email protected]> writes:
>
>> So I had a conversation with a different room-mate and I think we found
>> the word we're looking for.  "Flatten".  I think this has precedence in
>> Emacs with 'imenu-flatten'.  It does not seem to have precedence within
>> Org Mode though.
>>
>> We are taking a hierarchy and treating everything equally.  Just as if
>> we had flattened that hierarchy!
>>
>> Please let me know what you think of that word!
>
> Thanks for brainstorming further! While I understand the analogy from a
> Lisp/data-structure perspective, "flatten" feels more like an internal
> programming operation than a document-level concept that Org users would
> intuitively look for.

You've mentioned a few times about trying to avoid language that
describes the internals and instead use language that simply describes
the outcome.  I do agree with this.  However, we do have to describe a
specific algorithm.

>> In 'org-cycle' we are choosing how much of a region to reveal.  When we
>> reveal parts of the region they still retain their hierarchical value.
>> We can still see if heading is 4 levels deep or not.
>>
>> What this patch is doing is taking a hierarchy and saying that every
>> part of it should be treated as if it has equal weight.
>>
>> I think that is an important distinction that requires us to change our
>> language.  Recursive functions tends to flatten a hierarchy which is why
>> I gravitated to that word.  However, it would be nice to use a more
>> common word.  So I think we should use the word "flatten".
>
> I actually see this a bit differently. The hierarchy is not discarded or
> flattened here.
>
> The tree structure is fully preserved: each heading at every depth still
> gets its own row and displays its own distinct summary based on its
> exact position in the hierarchy. The calculations are aggregated
> bottom-up. A checkbox 4 levels deep only contributes to its direct
> ancestors, never to sibling branches.
>
> So the hierarchy isn't treated as flat; it strictly defines the boundaries
> of the aggregation at each level.

I've included an example at the end of this email that uses your patch.

The heading "blah" has 4 checkboxes under it.  Strictly following the
heirarchy results in [1/2] but flattening all the checkboxes underneath
it to have equivalent value results in [2/4].  This top-most value of
[2/4] can be described as being derived from a recursive algorithm or by
it flattening the heirarchy underneath it.

This same logic can be applied to the heading "subblah 2".

So I do believe that the heirarchy underneath each heading is being
flattened to calculate its own total.  You are correct that we are not
simplying flattening everything globally, but for each heading we are
indeed flattening the data underneath it to perform that heading's
calculation.

>> I will admit though that your arguments have softened my opposition to
>> using the word "subtree" a little.  I do appreciate you taking the time
>> to indulge me in this discussion :)
>>
>> Perhaps all this bike-shedding is a waste of time, but it is important
>> to me that things are named in a way that is precise and intuitive.
>
> I definitely appreciate the discussion too! It really helped clarify the
> reasoning behind these choices.
>

Right now as it stands I disagree with naming this feature "subtree".

However, if you would like, I will allow this patch through as is for a
few reasons.

1. It is clear to me that you have put thought into this

2. You are the maintainer of this code

3. I don't want to create unnecessary friction for contributors.  I want
them to be motivated to make contribution without fearing that I will
fight them on each little thing :P


#+begin_src org
,#+BEGIN: columnview :id "blah"
| ITEM            | A     | A     |
|-----------------+-------+-------|
| blah            | [1/2] | [2/4] |
| subblah 1       | [X]   | [X]   |
| subblah 2       | [1/2] | [1/3] |
| subsubblah 1    | [X]   | [X]   |
| subsubblah 2    | [0/2] | [0/2] |
| subsubsubblah 1 | [-]   | [-]   |
| subsubsubblah 2 | [ ]   | [ ]   |
,#+END:

,**** blah
:PROPERTIES:
:COLUMNS: %ITEM %A{X/} %A{Xs/}
:A:        [1/2]
:ID: blah
:END:

,***** subblah 1
:PROPERTIES:
:A: [X]
:END:
,***** subblah 2
:PROPERTIES:
:A:        [1/2]
:END:
,****** subsubblah 1
:PROPERTIES:
:A: [X]
:END:
,****** subsubblah 2
:PROPERTIES:
:A:        [0/2]
:END:
,******* subsubsubblah 1
:PROPERTIES:
:A: [-]
:END:
,******* subsubsubblah 2
:PROPERTIES:
:A: [ ]
:END:
#+end_src

Reply via email to