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: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: wkirschbaum <at> gmail.com, 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: Sat, 25 Mar 2023 15:44:18 +0200
On 25/03/2023 15:14, Eli Zaretskii wrote:
>> Date: Sat, 25 Mar 2023 15:00:24 +0200
>> Cc:wkirschbaum <at> gmail.com,casouri <at> gmail.com,62333 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dgutov <at> yandex.ru>
>>
>> On 25/03/2023 14:34, Eli Zaretskii wrote:
>>> Is there any real reason blink-matching-open narrows the buffer?  If
>>> we could remove that narrowing, the problem with the parser's taking
>>> notice of it would be gone.
>> Performance: to avoid scanning for the matching paren too far in the buffer.
> If that's the only reason, then tree-sitter based modes could widen
> back in their sexp-moving functions, since they use the parse data for
> this, right?

Not necessarily: it doesn't know the purpose for which the narrowing was 
applied. Could be for a mixed-major-mode thing, or some other purpose. 
Long lines?

Do we recall the exact design idea why tree-sitter visibility is limited 
by the narrowing bounds? Because if we wanted to widen in all similar 
situations, we might as well make it not obey the narrowing at all.




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.