From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ryan B Newsgroups: gmane.emacs.bugs Subject: bug#58780: python.el infinite loop in info-current-defun Date: Mon, 5 Dec 2022 07:01:19 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000db6b7e05ef15f78c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15314"; mail-complaints-to="usenet@ciao.gmane.io" To: 58780@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 06 02:41:59 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2My5-0003ir-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Dec 2022 02:41:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2MxE-0006If-IM; Mon, 05 Dec 2022 20:41:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2MxD-0006IX-PK for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 20:41:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2MxD-0002jZ-Ei for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 20:41:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2MxC-00042Z-0V for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 20:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ryan B Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 01:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58780 X-GNU-PR-Package: emacs Original-Received: via spool by 58780-submit@debbugs.gnu.org id=B58780.167029085315508 (code B ref 58780); Tue, 06 Dec 2022 01:41:01 +0000 Original-Received: (at 58780) by debbugs.gnu.org; 6 Dec 2022 01:40:53 +0000 Original-Received: from localhost ([127.0.0.1]:39574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Mx2-000424-To for submit@debbugs.gnu.org; Mon, 05 Dec 2022 20:40:53 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Cyp-00049l-2A for 58780@debbugs.gnu.org; Mon, 05 Dec 2022 10:02:04 -0500 Original-Received: (Authenticated sender: public@ryanb.org) by mail.gandi.net (Postfix) with ESMTPSA id D26B22000D for <58780@debbugs.gnu.org>; Mon, 5 Dec 2022 15:01:56 +0000 (UTC) Original-Received: by mail-vs1-f48.google.com with SMTP id c184so11327236vsc.3 for <58780@debbugs.gnu.org>; Mon, 05 Dec 2022 07:01:56 -0800 (PST) X-Gm-Message-State: ANoB5pncv0MPA5LJpt337M0PCVBHXMknW1WJOEa/T7+ccTreG2wOjPLD yW2h+TxnlPce9E05byIDuexGKKAxRNgl5EyiD10= X-Google-Smtp-Source: AA0mqf7NevZ3ym72riFl5MRji2ys6WFAHDl0Eu3RXeAUtytMZVT12he8neiQtzrLrHdc0N3cVF0pw8uxW1Qs3vCUl0k= X-Received: by 2002:a67:f8d4:0:b0:3aa:1a3a:6447 with SMTP id c20-20020a67f8d4000000b003aa1a3a6447mr36054359vsp.50.1670252515255; Mon, 05 Dec 2022 07:01:55 -0800 (PST) In-Reply-To: X-Gmail-Original-Message-ID: X-Mailman-Approved-At: Mon, 05 Dec 2022 20:40:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250081 Archived-At: --000000000000db6b7e05ef15f78c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I take it back, that override doesn't fully prevent it after all. =F0=9F=98= =A2 On Mon, Dec 5, 2022 at 6:57 AM Ryan B wrote: > Confirmed, probably the same root cause. When I brute force override > python-nav-end-of-statement like below, it doesn't happen any more. > > (defun python-nav-end-of-statement (&optional noend) > (interactive "^") > (forward-line 1)) > > > On Mon, Dec 5, 2022 at 6:44 AM Ryan B wrote: > >> I think I have a repro for this with a single quote ' , as opposed to >> triple string. I think I started seeing this hang after upgrading to Ema= cs >> 28.2. I now hit it very often, it's pretty painful. I don't know for sur= e >> that it's the same bug, but it seems likely. Reproduces with emacs -Q: >> >> =3D=3D=3D=3D=3D=3D >> class Foo(): >> >> def __init__(self): >> ' >> >> def bar(self): >> """Fetches posts and converts them to ActivityStreams activities. >> See source.Source.get_activities_response for details. app_id is >> ignored. min_id is translated to Twitter's since_id. >> """ >> pass >> =3D=3D=3D=3D=3D=3D >> >> The single quote and multiple lines in the docstring are necessary for >> the repro. No extra newline at the end needed though. >> >> JD, do you have a workaround for this? I may look into overriding >> python-nav-end-of-defun until it's fixed. Any other ideas? >> >> My emacs-version: GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, N= S >> appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2022-09-12 >> >> -- >> https://snarfed.org/ >> > > > -- > https://snarfed.org/ > --=20 https://snarfed.org/ --000000000000db6b7e05ef15f78c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I take it back, that override doesn't fully prevent it= after all. =F0=9F=98=A2

On Mon, Dec 5, 2022 at 6:57 AM Ryan B <pair@ryanb.org> wrote:
Confirme= d, probably the same root cause. When I brute force override python-nav-end= -of-statement like below, it doesn't happen any more.
(defun python-nav-end-of-statement (&optional noend)
=C2= =A0 (interactive "^")
=C2=A0 (forward-line 1))
<= br>

On Mon, Dec 5, 2022 at 6:44 AM Ryan B <pair@ryanb.org> wrote:
I think I h= ave a repro for this with a single quote ' , as opposed to triple strin= g. I think I started seeing this hang after upgrading to Emacs 28.2. I now = hit it very often, it's pretty painful. I don't know for sure that = it's the same bug, but it seems likely. Reproduces with emacs -Q:

=3D=3D=3D=3D=3D=3D
class Foo():
=C2=A0 def __init__(self):
=C2=A0 =C2=A0 '

=C2=A0 def bar(s= elf):
=C2=A0 =C2=A0 """Fetches posts and converts them to= ActivityStreams activities.
=C2=A0 =C2=A0 See source.Source.get_activit= ies_response for details. app_id is
=C2=A0 =C2=A0 ignored. min_id is tra= nslated to Twitter's since_id.
=C2=A0 =C2=A0 """
= =C2=A0 =C2=A0 pass
=3D=3D=3D=3D=3D=3D

The single quote and multiple lines in the docstring are necessary for th= e repro. No extra newline at the end needed though.

JD, do yo= u have a workaround for this? I may look into overriding python-nav-end-of-= defun until it's fixed. Any other ideas?

<= div>My emacs-version: GNU Emacs 28.2 (build 1,=20 aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build=20 21A559)) of 2022-09-12



--


--
--000000000000db6b7e05ef15f78c--