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: Gregory Heytings
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.






reply via email to

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