GNU bug report logs - #62333
30.0.50; Issue with tree-sitter syntax tree during certain changes

Previous Next

Package: emacs;

Reported by: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>

Date: Tue, 21 Mar 2023 14:15:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: wkirschbaum <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, casouri <at> gmail.com, 62333 <at> debbugs.gnu.org
Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes
Date: Mon, 27 Mar 2023 08:24:42 +0000
>>>> Again, I'm talking about using a parser library.  We may need to 
>>>> introduce a way of limiting the parser to a certain range of buffer 
>>>> text positions, independently of narrowing.
>>> 
>>> Except it's already limited by narrowing.
>> 
>> Which is a fragile, semi-broken means, as we all know.
>
> What is a broken mess, is user-level narrowing. And how the downstream 
> code can never guess the purpose the narrowing was applied for.
>

Note that this is what labeled narrowings attempts to solve.  It's perhaps 
not the best way to deal with code that has existed for a long time 
(because such code is not prepared to handle that kind of narrowing 
gracefully), but I don't see why it couldn't be used in new code/modes 
such as tree-sitter ones.  It is independent of user-level narrowing, and 
downstream code can act differently depending on the reason for which the 
narrowing was applied.





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.