GNU bug report logs - #78456
31.0.50; regression in treesit-simple-imenu

Previous Next

Package: emacs;

Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>

Date: Fri, 16 May 2025 14:04:02 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

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 78456 in the body.
You can then email your comments to 78456 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78456; Package emacs. (Fri, 16 May 2025 14:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincenzo Pupillo <v.pupillo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 May 2025 14:04:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; regression in treesit-simple-imenu
Date: Fri, 16 May 2025 16:03:32 +0200
Ciao, 
Imenu of ‘mhtml-ts-mode’ was able to show all (when I wrote mhtml-ts-mode) 
items regardless of the cursor's position within the file. 
For example, it always showed CSS, JavaScript, and HTML items. However, I 
realized that the behavior has changed, and the displayed items vary depending 
on the cursor's position.

If the cursor is placed inside the <script> tags, you will see HTML and 
JavaScript items, but not CSS items. If the cursor is positioned outside the 
<style> and <script> tags, only the HTML items are visible.

This change seems to be related to the patch (bug #77256). Is it possible to 
restore the previous behavior?

Thanks.
V.

--8<---------------cut here---------------start------------->8---
<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <style>
      body {
	  background-color: lightblue;
      }

      h1 {
	  color: white;
	  text-align: center;
      }

      p {
	  font-family: verdana;
	  font-size: 20px;
      }

      c {
	  color: red;
      }
    </style>
    <script>
      function myFunction(p1, p2) {
	  return p1 * p2;
      }

      function test(a, b) {
	  return a + b;
      }

      function provola(c, d, e) {
	  return c + d + e;
      }
    </script>
    <script>
      function tion(p1, p2) {
	  return p1 * p2;
      }

    </script>
  </head>
  <body>
    <h1>
      <div></div>
      <a href="http://example.com">http://example.com</a>
      <div></div>
      <div></div>
    </h1>
  </body>
</html>
--8<---------------cut here---------------end--------------->8---







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78456; Package emacs. (Fri, 16 May 2025 16:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 78456 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: 78456 <at> debbugs.gnu.org
Subject: Re: bug#78456: 31.0.50; regression in treesit-simple-imenu
Date: Fri, 16 May 2025 19:04:09 +0300
close 78456 31.0.50
thanks

> Ciao, 
> Imenu of ‘mhtml-ts-mode’ was able to show all (when I wrote mhtml-ts-mode) 
> items regardless of the cursor's position within the file. 
> For example, it always showed CSS, JavaScript, and HTML items. However, I 
> realized that the behavior has changed, and the displayed items vary depending 
> on the cursor's position.
>
> If the cursor is placed inside the <script> tags, you will see HTML and 
> JavaScript items, but not CSS items. If the cursor is positioned outside the 
> <style> and <script> tags, only the HTML items are visible.
>
> This change seems to be related to the patch (bug #77256). Is it possible to 
> restore the previous behavior?

Sorry, this was caused by the assumption that imenu should depend
on the language at point.  I have no opinion whether imenu should
be context-dependent or global to show tags from all languages.
So I just restored the previous behavior.




bug marked as fixed in version 31.0.50, send any further explanations to 78456 <at> debbugs.gnu.org and Vincenzo Pupillo <v.pupillo <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 16 May 2025 16:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78456; Package emacs. (Fri, 16 May 2025 16:08:01 GMT) Full text and rfc822 format available.

Message #13 received at 78456 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>, Juri Linkov <juri <at> linkov.net>
Cc: 78456 <at> debbugs.gnu.org
Subject: Re: bug#78456: 31.0.50; regression in treesit-simple-imenu
Date: Fri, 16 May 2025 19:07:05 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Fri, 16 May 2025 16:03:32 +0200
> 
> Ciao, 
> Imenu of ‘mhtml-ts-mode’ was able to show all (when I wrote mhtml-ts-mode) 
> items regardless of the cursor's position within the file. 
> For example, it always showed CSS, JavaScript, and HTML items. However, I 
> realized that the behavior has changed, and the displayed items vary depending 
> on the cursor's position.
> 
> If the cursor is placed inside the <script> tags, you will see HTML and 
> JavaScript items, but not CSS items. If the cursor is positioned outside the 
> <style> and <script> tags, only the HTML items are visible.
> 
> This change seems to be related to the patch (bug #77256). Is it possible to 
> restore the previous behavior?

I think you are talking about commit a6d746400cd?  So adding Juri to
the discussion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78456; Package emacs. (Tue, 20 May 2025 05:59:02 GMT) Full text and rfc822 format available.

Message #16 received at 78456 <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 78456 <at> debbugs.gnu.org
Subject: Re: bug#78456: 31.0.50; regression in treesit-simple-imenu
Date: Tue, 20 May 2025 07:58:16 +0200
[Message part 1 (text/plain, inline)]
Thanks Juri.
Vincenzo 

Il 16 maggio 2025 18:04:09 CEST, Juri Linkov <juri <at> linkov.net> ha scritto:
>close 78456 31.0.50
>thanks
>
>> Ciao, 
>> Imenu of ‘mhtml-ts-mode’ was able to show all (when I wrote mhtml-ts-mode) 
>> items regardless of the cursor's position within the file. 
>> For example, it always showed CSS, JavaScript, and HTML items. However, I 
>> realized that the behavior has changed, and the displayed items vary depending 
>> on the cursor's position.
>>
>> If the cursor is placed inside the <script> tags, you will see HTML and 
>> JavaScript items, but not CSS items. If the cursor is positioned outside the 
>> <style> and <script> tags, only the HTML items are visible.
>>
>> This change seems to be related to the patch (bug #77256). Is it possible to 
>> restore the previous behavior?
>
>Sorry, this was caused by the assumption that imenu should depend
>on the language at point.  I have no opinion whether imenu should
>be context-dependent or global to show tags from all languages.
>So I just restored the previous behavior.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 17 Jun 2025 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.