bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain ch


From: Eli Zaretskii
Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes
Date: Sat, 25 Mar 2023 16:14:00 +0300

> Date: Sat, 25 Mar 2023 15:00:24 +0200
> Cc: wkirschbaum@gmail.com, casouri@gmail.com, 62333@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@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?

> Which might seem like not that big a deal, or could even be handled in a 
> special way here using the parse tree, but narrowing has been used for 
> this purpose for a long time (to limit various kinds of searches or 
> movements), so fundamentally the problem will still be with us.

There are many fundamental problems we cannot solve, but I'd settle
with solving some of their particular instances, one at a time.  In
this case, the problem is caused by a mode-specific function that uses
parser data, and is called inside a restriction.  So let's try solving
this particular combination of factors, if we can.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]