help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python mode bugs


From: Ben Bacarisse
Subject: Re: python mode bugs
Date: Thu, 05 Apr 2018 23:11:33 +0100

"James K. Lowden" <jklowden@speakeasy.net> writes:

> I have two problems with python.el.  Maybe three.  
>
> 1.  GNU bug report logs - #29717[1]: imenu does not recognize function
> definitions with annotations.  
>
> 2.  imenu is purportedly bound to C-c C-j, but no "index" I supply
> returns anything but errors.  What does it want?

It wants the name of a class or a function and will auto-complete but if
imenu is not finding and to start with there will be nothing you enter
here!

> 3.  At 111 days old, it doesn't seem like the known bug is getting any
> attention.  What is the polite way to indicate it matters?

Some people say "Ping?".

> In case you *really* want to help, the offending function appears to be 
>
>       python-imenu--build-tree
>
> and the regex
>
>       python-nav-beginning-of-defun-regexp
>
> The difference in the pattern to be matched is: 
>
>       def f(a, b): #works
> vs
>       def f(a: int, b: str) -> bool: # fails

The pattern in python-nav-beginning-of-defun-regexp does not seem to be
the culprit.  It matches both of these.

> FWIW, I don't think the regex need include anything after the leading
> parenthesis.

Yes, that's what python-nav-beginning-of-defun-regexp does.  Nothing
after the name is examined.  In fact, it matches a def with no '(' at all.

The problem appears to be somewhere else, most likely in
python-imenu--build-tree as you say.

> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29717
-- 
Ben.


reply via email to

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