From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#31115: 26.1; python shell flicker Date: Thu, 12 Apr 2018 08:20:39 +0200 Message-ID: <4b3cf81a-bff1-2894-52ee-203782c4554b@easy-emacs.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1523513950 23212 195.159.176.226 (12 Apr 2018 06:19:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2018 06:19:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 To: 31115@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 12 08:19:06 2018 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 1f6VZZ-0005p1-HZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Apr 2018 08:19:05 +0200 Original-Received: from localhost ([::1]:39007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6Vbe-0004t4-Ki for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Apr 2018 02:21:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6VbV-0004sW-A8 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:21:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6VbR-00054q-Vp for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:21:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39073) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6VbR-000542-R9 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f6VbR-0004Bz-Hd for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Apr 2018 06:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152351402116052 (code B ref -1); Thu, 12 Apr 2018 06:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2018 06:20:21 +0000 Original-Received: from localhost ([127.0.0.1]:46970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6Vam-0004Aq-TJ for submit@debbugs.gnu.org; Thu, 12 Apr 2018 02:20:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6Val-0004Ab-Ip for submit@debbugs.gnu.org; Thu, 12 Apr 2018 02:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6Vaf-0004Wk-Au for submit@debbugs.gnu.org; Thu, 12 Apr 2018 02:20:14 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f6Vaf-0004WZ-7q for submit@debbugs.gnu.org; Thu, 12 Apr 2018 02:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6Vad-0004aW-92 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6Vaa-0004Uk-3i for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:20:11 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.131]:52101) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6VaZ-0004TT-Pg for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2018 02:20:08 -0400 Original-Received: from [192.168.178.35] ([94.223.89.85]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LhoIM-1ejlh91JUg-00n8ur for ; Thu, 12 Apr 2018 08:20:05 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:3vwWe7vzCZuCIUasaJQ7CUXlPWKg3eppyBzPn2Ex5iSLOX6eN9g 2z/efdgR+J4zi0vdT/0ss7nGLAqhMGzQbMI0rOpOIv041mjr7nFtNC8b80pJckGSuDlGZZs ZUfWvOQOKDYoIbkMO2nlSG+FdyICIgqqvp0o0MPuRF292McN7WFd5Wtx/zrSQ8ohggRByc8 lrNzJFVTs4qDQtTmz3tHg== X-UI-Out-Filterresults: notjunk:1;V01:K0:4kFoSLrBcUk=:BYupLINuL724xfr4i87Ljk u0/Lkqot+gAM4Dcp7xKWn28avAsoHeg2RLapXdiAgJqdzBEtTmHB+4GUzAB2wTFHpSO0PpG+e 3+6NzKwIe+6QHqXrALxA2S27qEaqz2PeIlnNltzivZM7iaPvCTLWU6IfZwbrGyfZ1BgYRH2pi arOB/uB7SRlDYzYKGHtRgGxx2npwrs2NqPHaW44LmjWic3eFvVTTgJRO6d/SqLp+026Jszpao baPf9uZxDYOXBpNr4gSK5SryroU8KbEmZoGdSkwA4v3YiqTGqy11mg2AmAtBEiI6YUyIikaCL EkQoHyiJxmteAm3qXdyaPSUcxUdIHa+q3wuN+Asp3y5oSBo1iAXmTpKVgAhl7EcvFnhLvd+wy trjpacLBw0BtAdRHcckDnnMOFXXw/EVC3j7INIS0Jps1HDg23WbsNxFnXmQ7kA/lA2uaXs0fq XEhGo199uK/H/PdFNkXmF1GWH1EgVu4sTaPJX2CaVrp1RApEADhrlfCdiuKiWEJSPhCpAJdX2 MywGChPmj7COx8JmhL5I+zhn7a4Ji2Kuxmzd8AqdMm25tmE5rV90pBQuvH7RLFY+7Fx+adbWA QTy/pf71WzeCYj9Tcos9bizz7orQXcistyAgYO3lKLDguk4z7iF/82Y57HWpt7UTH4nk2bNLm f2sHRFIxMFyfToFcZddFjXhOge5QNYVvyJorO/+NVcndnfcT3swelg75G8l2cS6aIdntzOpkb z82QXAxBClFvg1r27WPnsvX3huGJW4RNt6nCttODmpFB+afW7GvKsW2gERM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:145120 Archived-At: On 09.04.2018 20:19, Charles A. Roelli wrote: > emacs -q > M-x run-python RET C-x o > > Now press and hold down RET: a lot of prompts fly by, and as soon as > point reaches the bottom of the window, there is some flicker where > the cursor momentarily appears centered (as if `recenter' was run) and > simultaneously all the text in the buffer blinks as if the whole > screen was cleared and redrawn. In contrast, if you try this same > recipe in a normal shell buffer from M-x shell, there won't be any > flicker. > > Obviously, the above recipe is not a standard use case for a shell > buffer, but the same flicker is observed during normal use too. > > A naive fix is to comment out the meat of python-comint-postoutput- > scroll-to-bottom, and reevaluate it: > > (defun python-comint-postoutput-scroll-to-bottom (output) > "Faster version of `comint-postoutput-scroll-to-bottom'. > Avoids `recenter' calls until OUTPUT is completely sent." > ;; (when (and (not (string= "" output)) > ;; (python-shell-comint-end-of-output-p > ;; (ansi-color-filter-apply output))) > ;; (comint-postoutput-scroll-to-bottom output)) > output) > > I have no idea why that works, but it seems to help. The function in > question was added in the following commit: > > commit a6dc66a5441bc6832c12d362edd2d886edc1612a > Author: Fabián Ezequiel Gallina > Date: Sat Jul 26 23:02:38 2014 -0300 > > Faster comint output. > > * lisp/progmodes/python.el: > (python-comint-output-filter-function): Make obsolete. > (python-comint-postoutput-scroll-to-bottom): New function. > (inferior-python-mode): Set comint-output-filter-functions to a > minimum. > > Fixes: debbugs:16875 > > > Can't reproduce with GNU Emacs 26.1 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2018-04-10 at Debian