Subject: bug#60555: closed (Re: bug#60555: 29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 07 Jan 2023 11:39:02 +0000

Your bug report

#60555: 29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60555: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60555
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60555: 29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes
From: Daniel Martín <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked]
Date: Sat, 07 Jan 2023 12:38:11 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> 
>> My main confusion happened after reading this sentence:
>> 
>>   We talk about a node being “smaller” or “larger”, and “lower” or
>> “higher”.
>> 
>> That made me think there are two different dimensions we classify nodes:
>> "Size", that is, if the node is small or large, and "height", that is,
>> if it is low or high.  I was hoping to learn the differences between
>> "size" and "height" in the rest of the text, but the text didn't make it
>> clear to me because it only talks about "smaller and lower" and "larger
>> and higher".  What about "smaller and higher", or "larger and lower"?
>> Are they possible at all?  After reading everything, I got the idea that
>> the terms may actually be synonyms, but I was not 100% sure.  I feel we
>> could make this more clear from the start.
>> 
>> All of this is my perspective as a non-native English speaker.  Hope
>> this helps.
>
> Thanks, I've now reworded that text, please take a look.

Thanks, the text is now clearer to me.  I'm closing the bug.

Subject: 29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes
From: Daniel Martín <[email-masked]>
To: [email-masked]
Date: Wed, 04 Jan 2023 15:29:14 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

In the Elisp manual, under "37.3 Retrieving Nodes" there is this text:

   We talk about a node being “smaller” or “larger”, and “lower” or
“higher”.  A smaller and lower node is lower in the syntax tree and
therefore spans a smaller portion of buffer text; a larger and higher
node is higher up in the syntax tree, it contains many smaller nodes as
its children, and therefore spans a larger portion of text.

I think the concepts of nodes being "lower" and "higher" are more or
less clear, and the notation is similar to the one used in classic texts
about rooted trees.  However, the concepts of "smaller" and "larger" are
not very clear to me.  From the text, it seems that "lower" also means
"smaller", and "higher" always means "larger".  Is that correct, or
"smaller" and "larger" are really orthogonal to "lower" and "higher"?
If that's the case, I think the text needs some clarification, ideally
with a brief example.

Thanks.