From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25734: Python - fix imenu regexp for async functions Date: Sat, 18 Feb 2017 09:22:53 -0500 Message-ID: <87shnbk282.fsf@users.sourceforge.net> References: <53fdd849-4f99-48c0-bde7-7d07107984dc@Spark> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487427739 11120 195.159.176.226 (18 Feb 2017 14:22:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 14:22:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 25734@debbugs.gnu.org To: Michael Kleehammer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 18 15:22:14 2017 Return-path: Envelope-to: geb-bug-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 1cf5ts-00026c-VJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2017 15:22:13 +0100 Original-Received: from localhost ([::1]:58742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf5tv-0004T2-LH for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2017 09:22:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf5tm-0004Nn-RM for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 09:22:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf5ti-00046Z-Sp for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 09:22:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cf5ti-00046V-OZ for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 09:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cf5th-0004Ah-U2 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 09:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2017 14:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25734 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25734-submit@debbugs.gnu.org id=B25734.148742771016018 (code B ref 25734); Sat, 18 Feb 2017 14:22:01 +0000 Original-Received: (at 25734) by debbugs.gnu.org; 18 Feb 2017 14:21:50 +0000 Original-Received: from localhost ([127.0.0.1]:44426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf5tW-0004AD-JE for submit@debbugs.gnu.org; Sat, 18 Feb 2017 09:21:50 -0500 Original-Received: from mail-io0-f194.google.com ([209.85.223.194]:35516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf5tU-00049u-Ca; Sat, 18 Feb 2017 09:21:48 -0500 Original-Received: by mail-io0-f194.google.com with SMTP id m98so1400687iod.2; Sat, 18 Feb 2017 06:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=izbwbQku88SCppDvuTtbPAhpZmRyPV1wGLCmvBCaC8s=; b=Z1kcZrkHqOROZ7Ybv7TMQcDEM8ws5MTBy35DoyJ5zUSt3trqXAKtvCs7y6FaQphQTz whjHEivTwrDxBXtxrV82NsCV3U8sxb9gGgkqQtDL6m1lYq83QULJ/34zu8QEa9LC0Flq 5h7X3re84uNIsCJXorYWnEdU8dSsL3KzDuhAAfJu4E67GMCiec0l5Ck6UufM4sVmgb6k BiFRipDTI1ZCLRwRBgiRq0mCj3MS4LRrDynsN3qZ3LzDZSwEPn4GrGsbI0jdcHXsbYEB JOB3zDPYiAPFTr6UnlK5Vi2ZK0qr53ov5zA3ZcBzKxCngWmJGK3sQHRWIIS2buxpxC5J iVWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=izbwbQku88SCppDvuTtbPAhpZmRyPV1wGLCmvBCaC8s=; b=jRbJHhQeTgAzNSjGmalyphBu0TQ5vslKmbdaaNgZMrU10iD1nr3za3dKTpQX8gESRp sdHayeNlSCpfmLnrBpMp1qRpEvS0rgnutBZYPGFxfEzBSf0bONYEvi6qQ5nxU/Jb13YQ at1dO75+ozb9H6SsKnpCplZQoid8nJYGlhblm86T57miT8yallswuoamuFDIpHhtdwvr X3nliGcUcFStoiW/gQRs9jSaJPHAUyikniInyf161cL6/hWGxP+46qSf6gjsRx9gvZVz 86qSuL0SpT2ReG7/9xpdN8f8A7fDQWgMypt+NKgbWBvYqN695eZfzDobyOgaYp/bafqF 9eaQ== X-Gm-Message-State: AMke39mGa0HLXqOyo7LRQ3bPwU7ZM50FuCKg29DnDS18zKpQd4MPUaGCoSRBdeFGTqPdOw== X-Received: by 10.107.34.10 with SMTP id i10mr10398545ioi.41.1487427702888; Sat, 18 Feb 2017 06:21:42 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e139sm6384528iof.54.2017.02.18.06.21.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Feb 2017 06:21:42 -0800 (PST) In-Reply-To: <53fdd849-4f99-48c0-bde7-7d07107984dc@Spark> (Michael Kleehammer's message of "Tue, 14 Feb 2017 15:01:28 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129509 Archived-At: unarchive 24820 forcemerge 24820 25734 quit Michael Kleehammer writes: > This patch is for python mode. Recently Python 3 added the =E2=80=9Casync= =E2=80=9D > keyword for functions like so: > > def this_is_not_async(): > pass > > async def this_is_async(): > pass > > The mode has already been updated to recognize this for most things, > but not imenu. It currently would show: > > this_is_not_async (def) > def (async) > > The patch below is a minor modification for a regular expression. The > old one simply took the 2nd token on the line to be the name; the new > one skips the optional =E2=80=9Casync=E2=80=9D keyword. As far as I can tell, your patch has no effect on imenu, after applying it and doing M-x imenu RET TAB, I get this *Completions* buffer: Click on a completion to select it. In this buffer, type RET to select the completion near point. Possible completions are: *Rescan* def.(async) this_is_not_async.(def) Since the patch in #24820 does fix the problem, I'm merging this bug into that one. > Please note the current imenu is unusable in a file with a lot of > async functions - it would be nice if this rolled out with 25.2 if > possible, which I believe adds the rest of async support. AFAIK, it's too late to fix non-critical bugs in emacs-25, but python.el is both in Emacs "core" and a GNU ELPA package, so you can install the version from master using package.el (when we bump its package version, that is).