GNU bug report logs - #72034
29.3; python-ts-mode navigation fails

Previous Next

Package: emacs;

Reported by: Tim Loderhose <tim <at> loderhose.com>

Date: Wed, 10 Jul 2024 10:00:04 UTC

Severity: normal

Found in version 29.3

Done: Eli Zaretskii <eliz <at> gnu.org>

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 72034 in the body.
You can then email your comments to 72034 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#72034; Package emacs. (Wed, 10 Jul 2024 10:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Loderhose <tim <at> loderhose.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Jul 2024 10:00:04 GMT) Full text and rfc822 format available.

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

From: Tim Loderhose <tim <at> loderhose.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 29.3; python-ts-mode navigation fails
Date: Wed, 10 Jul 2024 09:45:01 +0000
[Message part 1 (text/plain, inline)]
python-nav-forward-defun doesn't work properly in python-ts-mode, for
example with this file:
https://raw.githubusercontent.com/timlod/onset-fingerprinting/6c8f9bd3b82398c9af3519036e0d5a550ad3bae7/onset_fingerprinting/data.py

Specifically, at some point it will stop navigating, even though there
are still function definitions to traverse (other times I saw it skipped
some definitions before stopping altogether). I noticed that this
usually happens after some point in the buffer, but I haven't been able
to nail it down exactly. My hunch is that it could be related to
decorators (e.g. @classmethod) or type hints, or both.

It does work properly using just python-mode. This is tested using
`emacs -q`, so this bug persists just on a clean Emacs 29.3.

I checked previous reports and believe this is probably related to
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60856, which isn't fixed yet.

In GNU Emacs 29.3 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,
cairo version 1.16.0) of 2024-06-08 built on pop-os
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Pop!_OS 22.04 LTS

Configured using:
'configure --with-native-compilation --with-json --without-mailutils
--without-pop'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72034; Package emacs. (Wed, 10 Jul 2024 12:14:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tim Loderhose <tim <at> loderhose.com>
Cc: 72034 <at> debbugs.gnu.org
Subject: Re: bug#72034: 29.3; python-ts-mode navigation fails
Date: Wed, 10 Jul 2024 15:13:12 +0300
> Date: Wed, 10 Jul 2024 09:45:01 +0000
> From: Tim Loderhose <tim <at> loderhose.com>
> 
> python-nav-forward-defun doesn't work properly in python-ts-mode, for
> example with this file:
> https://raw.githubusercontent.com/timlod/onset-fingerprinting/6c8f9bd3b82398c9af3519036e0d5a550ad3bae7/onset_fingerprinting/data.py
> 
> 
> Specifically, at some point it will stop navigating, even though there
> are still function definitions to traverse (other times I saw it skipped
> some definitions before stopping altogether). I noticed that this
> usually happens after some point in the buffer, but I haven't been able
> to nail it down exactly. My hunch is that it could be related to
> decorators (e.g. @classmethod) or type hints, or both.

I can reproduce this in Emacs 29, but not on the current emacs-30
release branch, which will eventually become Emacs 30.  So I guess we
already fixed that meanwhile.  Can you try building the development
code of Emacs and see if the problem goes away?

Thanks.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Mon, 15 Jul 2024 11:04:02 GMT) Full text and rfc822 format available.

Notification sent to Tim Loderhose <tim <at> loderhose.com>:
bug acknowledged by developer. (Mon, 15 Jul 2024 11:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tim Loderhose <tim <at> loderhose.com>
Cc: 72034-done <at> debbugs.gnu.org
Subject: Re: bug#72034: 29.3; python-ts-mode navigation fails
Date: Mon, 15 Jul 2024 14:03:13 +0300
> Date: Mon, 15 Jul 2024 09:54:05 +0000
> From: Tim Loderhose <tim <at> loderhose.com>
> Cc: 72034 <at> debbugs.gnu.org
> 
> I just built the latest emacs-30, and indeed the problem appears to be fixed there!

Thanks for testing, I'm therefore closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72034; Package emacs. (Mon, 15 Jul 2024 16:47:03 GMT) Full text and rfc822 format available.

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

From: Tim Loderhose <tim <at> loderhose.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72034 <at> debbugs.gnu.org
Subject: Re: bug#72034: 29.3; python-ts-mode navigation fails
Date: Mon, 15 Jul 2024 09:54:05 +0000
I just built the latest emacs-30, and indeed the problem appears to be fixed there!

On Wednesday, July 10th, 2024 at 2:13 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Wed, 10 Jul 2024 09:45:01 +0000
> > From:
> > 
> > Tim
> > 
> > Loderhose tim <at> loderhose.com
> > 
> > python-nav-forward-defun doesn't work properly in python-ts-mode, for
> > example with this file:
> > https://raw.githubusercontent.com/timlod/onset-fingerprinting/6c8f9bd3b82398c9af3519036e0d5a550ad3bae7/onset_fingerprinting/data.py
> > 
> > Specifically, at some point it will stop navigating, even though there
> > are still function definitions to traverse (other times I saw it skipped
> > some definitions before stopping altogether). I noticed that this
> > usually happens after some point in the buffer, but I haven't been able
> > to nail it down exactly. My hunch is that it could be related to
> > decorators (e.g. @classmethod) or type hints, or both.
> 
> 
> I can reproduce this in Emacs 29, but not on the current emacs-30
> release branch, which will eventually become Emacs 30. So I guess we
> already fixed that meanwhile. Can you try building the development
> code of Emacs and see if the problem goes away?
> 
> Thanks.




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

This bug report was last modified 83 days ago.

Previous Next


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