Subject: bug#73324: closed (Re: bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 22 Sep 2024 06:48:02 +0000

Your bug report

#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73324: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73324
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?
From: Yuan Fu <[email-masked]>
To: Vincenzo Pupillo <[email-masked]>
Cc: [email-masked]
Date: Sat, 21 Sep 2024 23:45:47 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

> On Sep 21, 2024, at 3:17 AM, Vincenzo Pupillo <[email-masked]> wrote:
> 
> In data sabato 21 settembre 2024 05:55:22 CEST, Yuan Fu ha scritto:
>>>> It works better, but the range update seems to be delayed or not
>>>> triggered by e.g. yank or undo, as you can see in the attached
>>>> screencast. After the yank the ranges are:
>>>> ((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1
>>>> . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser
>>>> for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))> 
>>> Ok, yeah, I can reproduce this now! Working on it.
>>> 
>>> Yuan
>> 
>> It should be fixed now on emacs-30.
> Yes, it works. 
> Thank you Yuan.

Great! Closing this report.

Subject: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?
From: Vincenzo Pupillo <[email-masked]>
To: [email-masked]
Date: Tue, 17 Sep 2024 22:29:14 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Ciao,
php-ts-mode no longer behaves as it used to. There seems to be some problems 
with the calculation of ranges covered by the parsers. In the image I attached 
you can see how the code is being parsed by both the php and javascript 
parsers. The namespace declaration has some elements colored as if they were 
escape sequences.
The php-ts-mode--get-parser-ranges function returns the following ranges:

((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser 
for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))

The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
The attached gif screencast shows the strange behavior in updating the font-
lock.
It doesn't happen all the time. I'm trying to isolate the problem.

Any ideas about this?
The parsers were installed with php-ts-mode-install-parser.

GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo 
version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64

Thanks.

Vincenzo