GNU bug report logs -
#62333
30.0.50; Issue with tree-sitter syntax tree during certain changes
Previous Next
Full log
Message #200 received at 62333 <at> debbugs.gnu.org (full text, mbox):
On 29/03/2023 14:17, Eli Zaretskii wrote:
>> Date: Wed, 29 Mar 2023 00:19:41 +0300
>> Cc: wkirschbaum <at> gmail.com, casouri <at> gmail.com, 62333 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov <at> yandex.ru>
>>
>>>> Like narrowing, but just for parsers? But parsers obey narrowing
>>>> already. Sounds a bit like conceptual duplication. How does this solve
>>>> blink-matching-paren issue anyway?
>>>
>>> We could widen without fearing that a parser will "invade" regions of
>>> buffer text that we don't want it to wander into.
>>
>> So any code that wants to restrict a "parser" based buffer, would need
>> to use a different primitive to narrow?
>
> No, the idea is to create the parser with these restrictions to begin
> with.
>
>> And vice versa, any code that uses a parser, will need to (widen)
>> first, to ensure that the parser is not affected by any restriction
>> set up by any code previously?
>
> No, if the parser is restricted, there should be no need to "widen"
> it, at least not in most cases I could think about where a parser
> should be restricted to a part of the buffer.
>
>> Anyway, I don't see why we should institute a special category for these
>> buffers.
>
> Because IMO it's cleaner and simpler than using narrowing, and doesn't
> suffer from the problems we see in narrowing.
You are not describing anything that one couldn't do with a major mode
before tree-sitter parsers (choose a region, apply font-lock keywords,
etc), so that should give you an idea that the suggestion is probably
not novel. And doesn't solve the existing problems in new ways.
Why would we apply that approach to "proper" parsers only?
>>>>>> The "grand unified theory of mixed major modes" has been attempted a few
>>>>>> times in the past, and never reached anything practical.
>>>>>
>>>>> But here we have a unique opportunity to maybe find a solution, at
>>>>> least for stuff based on tree-sitter and similar libraries. That
>>>>> maybe not "grand", but certainly "respectable".
>>>>
>>>> tree-sitter has its own support for mixed languages.
>>>
>>> So your argument about mmm framework was a red herring, cause that
>>> problem doesn't exist wrt tree-sitter parsers?
>>
>> Nope, see the first paragraph of my previous reply (the "no relevance" one).
>
> Which first paragraph is that? In what "previous reply" should I look
> and where? (And why couldn't you simply copy that here, to make
> following the discussion easier?)
The reply you answered with "I don't see the relevance". There is really
no good way to continue the explanation after that. Copying it into
multiple successive emails doesn't sound logical either.
>>>>>> My stance here is we shouldn't break it before we create a new one.
>>>>>
>>>>> No one broke anything. We are just discussing ideas. Please don't
>>>>> exaggerate.
>>>>
>>>> I never said anybody has broken anything already.
>>>
>>> You did say that my ideas break something, see above. Ideas cannot
>>> break any code, so this argument shouldn't be brought up if you want a
>>> calm and rational discussion.
>>
>> Ideas cannot, but implementing them can. "This or that change will break
>> an existing convention" is a rational argument.
>>
>> Shall we stop quibbling over words?
>
> I'm "quibbling" over words because your particular selection of words
> makes serious discussion nigh impossible. Not the first time, either.
> As soon as there's some disagreement, sooner or later those words
> (like "quibbling") come out. Whether it's because of some attitude or
> not, I don't know, but you may wish to reflect on that and perhaps try
> to express your disagreements using different words.
"Breaking a convention" is an industry term.
This bug report was last modified 2 years and 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.