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: Tue, 28 Mar 2023 14:30:34 +0300

> Date: Mon, 27 Mar 2023 20:05:07 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: dgutov@yandex.ru, wkirschbaum@gmail.com, casouri@gmail.com, 
>     62333@debbugs.gnu.org
> 
> > Labeled narrowing cannot solve this because it does nothing to alleviate 
> > the problems with user-defined narrowing.  So if the user narrows the 
> > buffer, we cannot do anything to safely widen in the general case, and 
> > labeled narrowing cannot help us.
> 
> I must be missing something, but I don't understand what you mean.  If a 
> user has narrowed a buffer to a certain region A-B, and if we want to 
> limit a parser to a certain region C-D, we can do that safely with
> 
> (with-narrowing C D :label 'parser-library BODY)

(You mean with-restriction.)

> which will work, independently of the A-B narrowing set by the user, and 
> will reset the narrowing to A-B upon return.

It will only work if [C..D] is inside [A..B].  It will not work if a
Lisp program wants to widen [A..B], i.e. if [C..D] is larger than
[A..B].





reply via email to

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