From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "James K. Lowden" Newsgroups: gmane.emacs.help Subject: python mode bugs Date: Thu, 5 Apr 2018 15:50:15 -0400 Organization: http://www.NewsDemon.com Message-ID: <20180405155015.6d92e8a38c4d14ae58ecc67d@speakeasy.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1522958006 21015 195.159.176.226 (5 Apr 2018 19:53:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2018 19:53:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 05 21:53:22 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f4Awj-0005M4-Fi for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 21:53:21 +0200 Original-Received: from localhost ([::1]:50880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4Ayo-0001g4-RO for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 15:55:30 -0400 X-Received: by 10.107.58.70 with SMTP id h67mr11309675ioa.38.1522957817025; Thu, 05 Apr 2018 12:50:17 -0700 (PDT) Original-Path: usenet.stanford.edu!u184-v6no7853299ita.0!news-out.google.com!15-v6ni1394itg.0!nntp.google.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad!fx04.iad.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Newsreader: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64--netbsd) Original-Lines: 36 Original-X-Complaints-To: abuse@newsdemon.com Original-NNTP-Posting-Date: Thu, 05 Apr 2018 19:50:16 UTC X-Received-Bytes: 1640 X-Received-Body-CRC: 2536279515 Original-Xref: usenet.stanford.edu gnu.emacs.help:222237 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116358 Archived-At: 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