From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.help Subject: Re: python mode bugs Date: Thu, 05 Apr 2018 23:11:33 +0100 Organization: A noiseless patient Spider Message-ID: <876055jobu.fsf@bsb.me.uk> References: <20180405155015.6d92e8a38c4d14ae58ecc67d@speakeasy.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522966407 28053 195.159.176.226 (5 Apr 2018 22:13:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2018 22:13:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 06 00:13:23 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 1f4D8E-0007DZ-UO for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Apr 2018 00:13:23 +0200 Original-Received: from localhost ([::1]:58535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4DAK-0005FH-G2 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 18:15:32 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-Injection-Info: reader02.eternal-september.org; posting-host="ce55c9ef57678a0c49782cb2554fe14d"; logging-data="31416"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/P0cV1wCaOZbe9FuQraZ6fMwHzhXzD0aQ=" Cancel-Lock: sha1:h1dIzi05n8e1uED+mhH4hGTt3to= sha1:AA2VHcKmfH+zob+LivoifdEx2TI= X-BSB-Auth: 1.b98a8d99cab2e0b58567.20180405231133BST.876055jobu.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:222243 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:116364 Archived-At: "James K. Lowden" 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.