From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#31115: 26.1; python shell flicker Date: Mon, 09 Apr 2018 20:19:51 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1523297891 21350 195.159.176.226 (9 Apr 2018 18:18:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2018 18:18:11 +0000 (UTC) To: 31115@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 20:18:07 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 1f5bMi-0005Pr-7Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2018 20:18:04 +0200 Original-Received: from localhost ([::1]:57159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5bOn-0007Sy-TY for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2018 14:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5bOg-0007SE-V9 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5bOc-0004ZG-8A for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5bOc-0004Z9-4C for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f5bOb-0003Jy-RW for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2018 18:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 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.152329795012690 (code B ref -1); Mon, 09 Apr 2018 18:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Apr 2018 18:19:10 +0000 Original-Received: from localhost ([127.0.0.1]:44233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5bNm-0003Ic-Ae for submit@debbugs.gnu.org; Mon, 09 Apr 2018 14:19:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5bNj-0003IN-Qf for submit@debbugs.gnu.org; Mon, 09 Apr 2018 14:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5bNd-0004AC-Kx for submit@debbugs.gnu.org; Mon, 09 Apr 2018 14:19:02 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5bNd-0004A6-Gd for submit@debbugs.gnu.org; Mon, 09 Apr 2018 14:19:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5bNc-0007Cp-DO for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:19:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5bNX-00047N-LL for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:19:00 -0400 Original-Received: from [2a03:2040:2:1b::1] (port=58912 helo=sinyavsky.aurox.ch) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5bNX-00043H-Cm for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2018 14:18:55 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 340A022702 for ; Mon, 9 Apr 2018 18:19:58 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :subject:subject:to:from:from:message-id:date:date; s=dkim; t= 1523297996; x=1524161997; bh=BbECo4PRs0uuhboZ37kZFF2qzNzCpuqJlk2 paE4v2LQ=; b=mSxvCl72MZ1DH3+GUEFp0lWukSmTSPpmsclEd4ONZAhJzcfUJqj K/Lvynuf7xzPMP6ytlGUPLKKy4R+mBxrvU/Dn6bcHHahyDBj9A2/lbBDuWFNWicJ 0z+fftjI6FVT9yAJrd+/7U+ZjzYrVuAyQ9/jBLbZKubhpvu3uH9hl6s4= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id h23K-WggLnhi for ; Mon, 9 Apr 2018 18:19:56 +0000 (UTC) Original-Received: from gray (202.100.1.85.dynamic.wline.res.cust.swisscom.ch [85.1.100.202]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id A93A5226F2 for ; Mon, 9 Apr 2018 18:19:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:145049 Archived-At: 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=3D "" 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=C3=A1n 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