GNU bug report logs -
#59455
29.0.50; Treesit font lock changes unrelated code
Previous Next
Reported by: Theodor Thornhill <theo <at> thornhill.no>
Date: Mon, 21 Nov 2022 20:14:02 UTC
Severity: normal
Found in version 29.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59455 in the body.
You can then email your comments to 59455 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
casouri <at> gmail.com, bug-gnu-emacs <at> gnu.org
:
bug#59455
; Package
emacs
.
(Mon, 21 Nov 2022 20:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Theodor Thornhill <theo <at> thornhill.no>
:
New bug report received and forwarded. Copy sent to
casouri <at> gmail.com, bug-gnu-emacs <at> gnu.org
.
(Mon, 21 Nov 2022 20:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Yuan!
I've noticed some strange behavior with font-lock lately in c-ts-mode,
and also in all the other ts modes.
to reproduce:
emacs -Q
C-x C-f foo.c RET
Insert this:
```
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
int
foo (void)
{
return 5;
}
int
foo (void)
{
if (x)
{
return 5;
}
}
int
foo (void)
{
return 5;
}
```
M-x c-ts-mode RET
Now on the first line, repeatedly press 'M-c' (capitalize-word) and
watch the highlights of the rest of the file jump around. Then try
undoing the changes by repeatedly pressing 'C-/' until you are back at
the state right after the first insert. Now highlights are messed up.
I'm not sure where to start looking for this, but I do remember there
being some issues in Eglot with these "multi-edit" commands.
If you have some pointers for where to look I can dig around :)
Theo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59455
; Package
emacs
.
(Tue, 22 Nov 2022 11:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 59455 <at> debbugs.gnu.org (full text, mbox):
On 22 November 2022 11:05:50 CET, Yuan Fu <yuf011 <at> ucsd.edu> wrote:
>
>Theodor Thornhill <theo <at> thornhill.no> writes:
>
>> Hi Yuan!
>>
>> I've noticed some strange behavior with font-lock lately in c-ts-mode,
>> and also in all the other ts modes.
>>
>> to reproduce:
>>
>> emacs -Q
>>
>> C-x C-f foo.c RET
>>
>> Insert this:
>>
>> ```
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>> /* lol lol lol lol lol lol lol lol lol lol */
>>
>> int
>> foo (void)
>> {
>> return 5;
>> }
>>
>> int
>> foo (void)
>> {
>> if (x)
>> {
>> return 5;
>> }
>> }
>>
>> int
>> foo (void)
>> {
>> return 5;
>> }
>> ```
>>
>> M-x c-ts-mode RET
>>
>> Now on the first line, repeatedly press 'M-c' (capitalize-word) and
>> watch the highlights of the rest of the file jump around. Then try
>> undoing the changes by repeatedly pressing 'C-/' until you are back at
>> the state right after the first insert. Now highlights are messed up.
>>
>> I'm not sure where to start looking for this, but I do remember there
>> being some issues in Eglot with these "multi-edit" commands.
>>
>> If you have some pointers for where to look I can dig around :)
>
>Thanks for the catch! It is due to tree-sitter not correctly recording
>changes in casefiddle.c. I’ve fixed it now.
> Now you can Lol as much as your heart desire.
Don't you always capitalize lols at the top of your files?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59455
; Package
emacs
.
(Tue, 22 Nov 2022 11:38:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 59455 <at> debbugs.gnu.org (full text, mbox):
Theodor Thornhill <theo <at> thornhill.no> writes:
> Hi Yuan!
>
> I've noticed some strange behavior with font-lock lately in c-ts-mode,
> and also in all the other ts modes.
>
> to reproduce:
>
> emacs -Q
>
> C-x C-f foo.c RET
>
> Insert this:
>
> ```
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
> /* lol lol lol lol lol lol lol lol lol lol */
>
> int
> foo (void)
> {
> return 5;
> }
>
> int
> foo (void)
> {
> if (x)
> {
> return 5;
> }
> }
>
> int
> foo (void)
> {
> return 5;
> }
> ```
>
> M-x c-ts-mode RET
>
> Now on the first line, repeatedly press 'M-c' (capitalize-word) and
> watch the highlights of the rest of the file jump around. Then try
> undoing the changes by repeatedly pressing 'C-/' until you are back at
> the state right after the first insert. Now highlights are messed up.
>
> I'm not sure where to start looking for this, but I do remember there
> being some issues in Eglot with these "multi-edit" commands.
>
> If you have some pointers for where to look I can dig around :)
Thanks for the catch! It is due to tree-sitter not correctly recording
changes in casefiddle.c. I’ve fixed it now. Now you can Lol as much as
your heart desire.
Yuan
Reply sent
to
Yuan Fu <casouri <at> gmail.com>
:
You have taken responsibility.
(Wed, 23 Nov 2022 18:34:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Theodor Thornhill <theo <at> thornhill.no>
:
bug acknowledged by developer.
(Wed, 23 Nov 2022 18:34:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 59455-done <at> debbugs.gnu.org (full text, mbox):
Theodor Thornhill <theo <at> thornhill.no> writes:
> On 22 November 2022 11:05:50 CET, Yuan Fu <yuf011 <at> ucsd.edu> wrote:
>>
>>Theodor Thornhill <theo <at> thornhill.no> writes:
>>
>>> Hi Yuan!
>>>
>>> I've noticed some strange behavior with font-lock lately in c-ts-mode,
>>> and also in all the other ts modes.
>>>
>>> to reproduce:
>>>
>>> emacs -Q
>>>
>>> C-x C-f foo.c RET
>>>
>>> Insert this:
>>>
>>> ```
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>>
>>> int
>>> foo (void)
>>> {
>>> return 5;
>>> }
>>>
>>> int
>>> foo (void)
>>> {
>>> if (x)
>>> {
>>> return 5;
>>> }
>>> }
>>>
>>> int
>>> foo (void)
>>> {
>>> return 5;
>>> }
>>> ```
>>>
>>> M-x c-ts-mode RET
>>>
>>> Now on the first line, repeatedly press 'M-c' (capitalize-word) and
>>> watch the highlights of the rest of the file jump around. Then try
>>> undoing the changes by repeatedly pressing 'C-/' until you are back at
>>> the state right after the first insert. Now highlights are messed up.
>>>
>>> I'm not sure where to start looking for this, but I do remember there
>>> being some issues in Eglot with these "multi-edit" commands.
>>>
>>> If you have some pointers for where to look I can dig around :)
>>
>>Thanks for the catch! It is due to tree-sitter not correctly recording
>>changes in casefiddle.c. I’ve fixed it now.
>
>
>> Now you can Lol as much as your heart desire.
>
> Don't you always capitalize lols at the top of your files?
I should do it more, heard that it’s a good warm-up for programming :-)
Closing.
Yuan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 22 Dec 2022 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.