unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* python mode bugs
@ 2018-04-05 19:50 James K. Lowden
  2018-04-05 21:02 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: James K. Lowden @ 2018-04-05 19:50 UTC (permalink / raw)
  To: help-gnu-emacs

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?  

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?  

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

FWIW, I don't think the regex need include anything after the leading
parenthesis.  The following awk script is too simple because it doesn't
recognize nested functions and class methods, but otherwise does the
trick: 

	awk -F'[\t ()]' '/^def +/ {print $2}'

Any help much appreciated.  

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-05-02  6:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-05 19:50 python mode bugs James K. Lowden
2018-04-05 21:02 ` Stefan Monnier
2018-04-05 22:11 ` Ben Bacarisse
2018-04-06 10:37   ` Robert Pluim
     [not found]   ` <mailman.11778.1523011049.27995.help-gnu-emacs@gnu.org>
2018-04-06 10:47     ` Ben Bacarisse
2018-04-06 12:43       ` Robert Pluim
     [not found]       ` <mailman.11780.1523018635.27995.help-gnu-emacs@gnu.org>
2018-04-06 13:29         ` Ben Bacarisse
2018-04-08 17:16           ` Andreas Röhler
     [not found]           ` <mailman.11903.1523207780.27995.help-gnu-emacs@gnu.org>
2018-04-08 20:16             ` Ben Bacarisse
2018-04-09  5:47               ` Andreas Röhler
2018-04-06 16:53         ` James K. Lowden
2018-05-01 18:16 ` James K. Lowden
2018-05-02  6:34   ` Colin Baxter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).