all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Mario Lang <mlang@delysid.org>
Cc: emacs-devel@gnu.org
Subject: Re: comint-preoutput-filter-functions and flickering redisplay in TTY
Date: Tue, 03 Jun 2014 14:27:44 +0200	[thread overview]
Message-ID: <87vbsigou7.fsf@geodiff-mac3.ulb.ac.be> (raw)
In-Reply-To: <87r4366w66.fsf@fx.delysid.org> (Mario Lang's message of "Tue, 03 Jun 2014 13:59:29 +0200")

Mario Lang <mlang@delysid.org> 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.



  reply	other threads:[~2014-06-03 12:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 11:59 comint-preoutput-filter-functions and flickering redisplay in TTY Mario Lang
2014-06-03 12:27 ` Nicolas Richard [this message]
2014-06-03 13:12   ` Mario Lang
2014-06-04 10:36     ` Nicolas Richard
2014-06-04 12:30   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbsigou7.fsf@geodiff-mac3.ulb.ac.be \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=emacs-devel@gnu.org \
    --cc=mlang@delysid.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.