From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#47657: python-shell font-lock with multi-line input: runaway fontification buffer length Date: Tue, 13 Apr 2021 09:14:20 -0400 Message-ID: <1971BD45-05FC-4124-8A3C-7EBC968D55D5@gmail.com> References: <603226C1-620D-4C53-B8E9-A2ECA3A3DB3C@gmail.com> <87y2dnyhix.fsf@gnus.org> <0BCE3A3A-7A11-465A-8057-0546097D99FA@gmail.com> <87fszusj6z.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_C710EBA4-84BA-4682-A772-3BA3B81D5E15" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4256"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47657@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 13 15:15:42 2021 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 1lWItK-0000yq-IC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Apr 2021 15:15:42 +0200 Original-Received: from localhost ([::1]:56158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWItJ-00033e-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Apr 2021 09:15:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWIsg-0002xI-Eu for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 09:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWIsg-0008S0-7X for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 09:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWIsg-0003uI-3e for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 09:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Apr 2021 13:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47657 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 47657-submit@debbugs.gnu.org id=B47657.161831967214941 (code B ref 47657); Tue, 13 Apr 2021 13:15:02 +0000 Original-Received: (at 47657) by debbugs.gnu.org; 13 Apr 2021 13:14:32 +0000 Original-Received: from localhost ([127.0.0.1]:59288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWIsC-0003sv-5c for submit@debbugs.gnu.org; Tue, 13 Apr 2021 09:14:32 -0400 Original-Received: from mail-io1-f49.google.com ([209.85.166.49]:36602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWIs9-0003se-RH for 47657@debbugs.gnu.org; Tue, 13 Apr 2021 09:14:30 -0400 Original-Received: by mail-io1-f49.google.com with SMTP id d5so7574614iof.3 for <47657@debbugs.gnu.org>; Tue, 13 Apr 2021 06:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ZpUayER7av/LR0+KH5ne0clwzeU4FGmgB1r/ciIvB38=; b=WRcBWIxQfuYsGck9Xxc3cWu41BUAzgSYw/KUv2aM3a/yHP3ov0ZO10fedBR8tfgwv4 tRzqCWPiEjIU5V2x0YksD1jkk8fbDYcfkv6NuPHH7io1hIuXZTF3Gt8k+3DsTLGHLbnr f7SMZqS7sP991edPGloP9Ji35ojDAZGysuTRJZGVAZS8PGz54cw79bSYP4XX/7fIREVS rlBnHNkmeNgLZmVQUuc5b99p0ShMZ0kUVmYpGCcniTf/XmvvlhDx2dnkH8vpKUvw9R1k r3+rdkxMGr9edslMT1PjkLeFRGGo1TsUOr1daFH0peAHcqJCx15yqe2NX4lAz9EchTsx GfMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ZpUayER7av/LR0+KH5ne0clwzeU4FGmgB1r/ciIvB38=; b=WSqtHvAGa7oWzbi4zxqR6D8GW1Lj7frws6C6Y3LTwjx/P6noyswBOZrPQQLha9/xzR 90lZCa8RnxKWX8vFueq5cQ69azxV+1vPI2ZmN1aUjagO+m5ECfDzfQVeeCR/vUzdh0xj +m9xJPH2dffndEbFTOjgmKjivgOPnUf64G9fVPbGGG9ngM0Aso8LRJ3bNgl1Qj3Vx1tc S1BEyGD1F4SaQG0WsR5CZXk/vhtcePqncPNzcHvYEuPyPQxyGe4Msryw8LEFdz0zk9Zm 13anC17WDfwKWPfAOF35RVX5K8MyCk7heB5e7G+3mOHUgdjczm5v84pTUdfZov4kKH0R qjeg== X-Gm-Message-State: AOAM5316zUmEL2bJnl54eg/lgoSuFu7fPZJlDqeTpIIQ6bhHmd58g2Jg cQ3KQwLUdaeVGcG6TjcAYgg= X-Google-Smtp-Source: ABdhPJzi5zGH3IdkgO565vgCCOy40hnXnubbf6y9j3QgfcRO7r+wQai5bCmRhx9zespm+NoEcVJxjg== X-Received: by 2002:a5e:990f:: with SMTP id t15mr25657583ioj.180.1618319664218; Tue, 13 Apr 2021 06:14:24 -0700 (PDT) Original-Received: from [192.168.0.113] (cm-134-228-54-223.buckeyecom.net. [134.228.54.223]) by smtp.gmail.com with ESMTPSA id s16sm6880984ilq.87.2021.04.13.06.14.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Apr 2021 06:14:23 -0700 (PDT) In-Reply-To: <87fszusj6z.fsf@gnus.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) 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" Xref: news.gmane.io gmane.emacs.bugs:203963 Archived-At: --Apple-Mail=_C710EBA4-84BA-4682-A772-3BA3B81D5E15 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 13, 2021, at 4:05 AM, Lars Ingebrigtsen wrote: >=20 > JD Smith writes: >=20 >> Do you have a step-by-step recipe, starting from "emacs -Q", to >> reproduce this problem? >>=20 >> 1 emacs -Q >> 2 M-x run-python >> 3 C-x 5 b =E2=80=9C *Python-font-lock*=E2=80=9D >> 4 In inferior python shell: type any line. >> 5 C-c SPC (`comint-accumulate=E2=80=99) to continue. >> 6 Type another line. Notice the first line is repeated.=20 >> 7 Repeat steps 5 & 6 several times.=20 >=20 > You didn't say what Emacs version you're using -- I tested this in = Emacs > 28, and was unable to reproduce this. The " *Python-font-lock*" = buffer > never contains more than a single non-blank line using this recipe. > (The "any line" I used to test was "5=E2=80=9D.) Mac port, v27.2, python-mode v0.26.1. I have a hard time understanding = how this would not reproduce, as (buffer-substring-no-properties = prompt-end (point-max)) clearly takes all of the text (multi-lines = included) from the prompt onward. I took a look here = (python-mode v0.27.1) and the = input is gathered in the same manner in the post-command-hook. The = =E2=80=9Crepeated=E2=80=9D lines in #6 are in the *Python-font-lock* = buffer, btw.=20= --Apple-Mail=_C710EBA4-84BA-4682-A772-3BA3B81D5E15 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Apr 13, 2021, at 4:05 AM, Lars Ingebrigtsen <larsi@gnus.org> = wrote:

JD Smith <jdtsmith@gmail.com> writes:

Do you have a = step-by-step recipe, starting from "emacs -Q", to
= reproduce this problem?

1 emacs -Q
2 M-x run-python
3 C-x 5 b =E2=80=9C = *Python-font-lock*=E2=80=9D
4 In inferior python shell: = type any line.
5 C-c SPC (`comint-accumulate=E2=80=99) to = continue.
6 Type another line.  Notice the first line = is repeated.
7 Repeat steps 5 & 6 several times.

You didn't say what Emacs version = you're using -- I tested this in Emacs
28, and was unable = to reproduce this.  The " *Python-font-lock*" buffer
never contains more than a single non-blank line using this = recipe.
(The "any line" I used to test was "5=E2=80=9D.)

Mac port, = v27.2, python-mode v0.26.1.  I have a hard time understanding how = this would not reproduce, as (buffer-substring-no-properties  prompt-end (point-max)) clearly takes all of the text = (multi-lines included) from = the prompt onward.  I took a look here (python-mode v0.27.1) and the input = is gathered in the same manner in the post-command-hook. =  The =E2=80=9Crepeated=E2=80=9D lines in #6 are in the = *Python-font-lock* buffer, btw. 
= --Apple-Mail=_C710EBA4-84BA-4682-A772-3BA3B81D5E15--