GNU bug report logs - #47657
python-shell font-lock with multi-line input: runaway fontification buffer length

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Thu, 8 Apr 2021 15:49:02 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: JD Smith <jdtsmith <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 47657 <at> debbugs.gnu.org
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 part 1 (text/plain, inline)]

> On Apr 13, 2021, at 4:05 AM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> JD Smith <jdtsmith <at> 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 “ *Python-font-lock*”
>> 4 In inferior python shell: type any line.
>> 5 C-c SPC (`comint-accumulate’) 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”.)

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 <https://github.com/emacs-mirror/emacs/blob/b064ddd3f600ed28e62b09d556ecced5f80d9883/lisp/progmodes/python.el#L2710> (python-mode v0.27.1) and the input is gathered in the same manner in the post-command-hook.  The “repeated” lines in #6 are in the *Python-font-lock* buffer, btw. 
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.