From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.devel Subject: Re: comint-preoutput-filter-functions and flickering redisplay in TTY Date: Tue, 03 Jun 2014 14:27:44 +0200 Message-ID: <87vbsigou7.fsf@geodiff-mac3.ulb.ac.be> References: <87r4366w66.fsf@fx.delysid.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401798434 12771 80.91.229.3 (3 Jun 2014 12:27:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2014 12:27:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mario Lang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 03 14:27:08 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wrno3-0003Mb-36 for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2014 14:27:07 +0200 Original-Received: from localhost ([::1]:52534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrno2-00089d-C2 for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2014 08:27:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrnnu-00088z-Un for emacs-devel@gnu.org; Tue, 03 Jun 2014 08:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wrnno-0002PS-M8 for emacs-devel@gnu.org; Tue, 03 Jun 2014 08:26:58 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:17986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrnno-0002Nn-GB for emacs-devel@gnu.org; Tue, 03 Jun 2014 08:26:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArAKAK++jVOkD4Xx/2dsb2JhbABZg1mrDwEBAQEBAQaYGwGBI3SCJgEFeRALDhMNARcPAQRJE4gtARSvK5w7AYYZF4VVggOGegcSAYQtBJdHg3qFGIxbgzo7gTIHFw Original-Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3.ulb.ac.be) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 03 Jun 2014 14:26:30 +0200 In-Reply-To: <87r4366w66.fsf@fx.delysid.org> (Mario Lang's message of "Tue, 03 Jun 2014 13:59:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172286 Archived-At: Mario Lang writes: > To reproduce: Install chess.el, call M-x chess-ics RET, login to > freechess.org (as guest is OK), and wait a bit. Your screen (at least in -nw mode) > should start to flicker noticeably every once in a while. > > Any ideas why? I tried it in my GUI emacs (just to try chess.el, in fact) and noticed very frequent recentering of my window, even when not in the *chess-ics* buffer. By tracing "recenter" I found that tabulated-list-print calls (recenter) without checking what the selected window is. here's the patch I applied, perhaps you can try it out and see if it fixes the problem for you. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index d0d71dd..dd1166f 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -323,7 +323,9 @@ to the entry with the same ID element as the current line." (if saved-pt (progn (goto-char saved-pt) (move-to-column saved-col) - (recenter)) + (when (eq (window-buffer (selected-window)) + (current-buffer)) + (recenter))) (goto-char (point-min))))) (defun tabulated-list-print-entry (id cols) -- Nico.