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: Sun, 25 Apr 2021 13:53:35 -0400 Message-ID: References: <603226C1-620D-4C53-B8E9-A2ECA3A3DB3C@gmail.com> <87y2dnyhix.fsf@gnus.org> <0BCE3A3A-7A11-465A-8057-0546097D99FA@gmail.com> <87fszusj6z.fsf@gnus.org> <1971BD45-05FC-4124-8A3C-7EBC968D55D5@gmail.com> <87lf96l139.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=_C35D766C-B623-43B3-BD54-BA37493F75D4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23299"; 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 Sun Apr 25 19:54:12 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 1laixP-0005ui-7i for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 19:54:11 +0200 Original-Received: from localhost ([::1]:49418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laixO-00010t-8L for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 13:54:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laixG-00010i-RR for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 13:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laixG-00036d-Jy for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 13:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laixG-0002ub-Hx for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 13:54: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: Sun, 25 Apr 2021 17:54: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.161937322711170 (code B ref 47657); Sun, 25 Apr 2021 17:54:02 +0000 Original-Received: (at 47657) by debbugs.gnu.org; 25 Apr 2021 17:53:47 +0000 Original-Received: from localhost ([127.0.0.1]:43672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laix0-0002u5-Tm for submit@debbugs.gnu.org; Sun, 25 Apr 2021 13:53:47 -0400 Original-Received: from mail-qk1-f174.google.com ([209.85.222.174]:43572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laiwy-0002tp-9V for 47657@debbugs.gnu.org; Sun, 25 Apr 2021 13:53:45 -0400 Original-Received: by mail-qk1-f174.google.com with SMTP id u20so22292805qku.10 for <47657@debbugs.gnu.org>; Sun, 25 Apr 2021 10:53:44 -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=pVPhH23taTTxjXY2BOhh2KNF4E2Q0lSqnSfgKYMharo=; b=QdVxuiVdUOVBPQDNndCf3P1LcWAoLgXCvmTeymGVsJ5vJf7f/rDLOT7cIeV61CSOjM Nf3cka4EFSNX1QxyldQMruNLc8DVc7IrnWkwIVpLiKhesRJ6KorclwY5LJoOpo4NFupi m8VD+XxhB9MSu3tiJG7QYUuKauHdSPoSVCnvAE6kIywJSx3gY4OydnwvuG26MusnrN78 KIcOqVkJopwgwOy2uekS3a/jDxBTjBBPbjAetlWjVavhSdA1l1/VSNMgKzNl1/jXv2yu GZvo4nipD5xOObEJn+lgD8yh6n+2wbJ9JbuXH10Vm7eidW6aVt3yWEsbWsqjw/NccDB1 LslQ== 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=pVPhH23taTTxjXY2BOhh2KNF4E2Q0lSqnSfgKYMharo=; b=WxPjGWpuGUyJcUD8PAhYQnKNe8IxCfKVySPFV26NWcMVbR7U1DA3aFr/ZeJNlJLtcy Bc5ViaRPhR++QVEypnQ3LN5bdzS3Au1LS9rTj4+mGgfPbewtMAhvEOUMlsLxPrGnRjC4 vpekGe7lx/U2ZeBAdyitht9lDNxq/G9uZ2r0OlDmK6Bo8AFyxfcnP9WfbFvzm8Jj7eCy B+/HbW04sKeH+Eax4Us8uHn6L9xX46c0XUjf7FNhszwaeOqKPvMl+o5MWbaeJQyOHICp gHBsX5QmbhMG4iMLICfRXNlpE4hTbnYXCUUjY0qT677AO7zVhamGyVQOJTVH/4zC38BB wnkg== X-Gm-Message-State: AOAM531FD7Dc+GnH9TDyBUHBN9jkexym1ia2TBabNeKaZXpOR7eiZ2TM WWnWVgwDVj3dAKnnXdJv78Y= X-Google-Smtp-Source: ABdhPJwc5UKXrC6lE2qNBrDLjK/gzHype3nzksu4p91hQU8vv6RrzFlRG8/2rJ/EqYUp+w7O4shS5A== X-Received: by 2002:a37:e10e:: with SMTP id c14mr13407927qkm.209.1619373218528; Sun, 25 Apr 2021 10:53:38 -0700 (PDT) Original-Received: from [192.168.0.100] (cm-134-228-54-223.buckeyecom.net. [134.228.54.223]) by smtp.gmail.com with ESMTPSA id x24sm8950820qtm.95.2021.04.25.10.53.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Apr 2021 10:53:38 -0700 (PDT) In-Reply-To: <87lf96l139.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:204894 Archived-At: --Apple-Mail=_C35D766C-B623-43B3-BD54-BA37493F75D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Very odd, I get : 1 1 7 in *Python-font-lock* after precisely these same steps. What if you use = C-j in step #5 instead of C-c SPC? > On Apr 25, 2021, at 1:34 PM, Lars Ingebrigtsen wrote: >=20 > JD Smith writes: >=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.) >>=20 >> 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 > After typing "1" in 4) and "7" in 6), the buffer looks like: >=20 > > So just the "7", and not the first line, which was "1". >=20 > Perhaps there's some missing element in your recipe? >=20 > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no --Apple-Mail=_C35D766C-B623-43B3-BD54-BA37493F75D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Very = odd, I get :

1
1
7

in *Python-font-lock* after = precisely these same steps.  What if you use C-j in step #5 instead = of C-c SPC?


On Apr 25, 2021, at 1:34 PM, = Lars Ingebrigtsen <larsi@gnus.org> wrote:

JD = Smith <jdtsmith@gmail.com> writes:

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.

After typing "1" in 4) and "7" in = 6), the buffer looks like:

<Mail = Attachment.png>
So just the "7", and not the = first line, which was "1".

Perhaps there's = some missing element in your recipe?

--
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog: http://lars.ingebrigtsen.no

= --Apple-Mail=_C35D766C-B623-43B3-BD54-BA37493F75D4--