From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#16621: 24.3.50; Periodic timer + overlays = flickering near point Date: Tue, 04 Feb 2014 04:34:58 +0200 Message-ID: <52F051D2.9020404@yandex.ru> References: <87r47m72ft.fsf@yandex.ru> <838utt4gff.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1391481379 10576 80.91.229.3 (4 Feb 2014 02:36:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2014 02:36:19 +0000 (UTC) Cc: 16621@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 04 03:36:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WAVs8-0008ML-Or for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Feb 2014 03:36:24 +0100 Original-Received: from localhost ([::1]:50434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAVs8-0000Ur-96 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Feb 2014 21:36:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAVrx-0000Uj-Dn for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2014 21:36:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAVrn-0005xF-3C for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2014 21:36:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAVrm-0005xB-Vx for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2014 21:36:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WAVrm-0001v0-LO for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2014 21:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Feb 2014 02:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16621 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16621-submit@debbugs.gnu.org id=B16621.13914813087302 (code B ref 16621); Tue, 04 Feb 2014 02:36:02 +0000 Original-Received: (at 16621) by debbugs.gnu.org; 4 Feb 2014 02:35:08 +0000 Original-Received: from localhost ([127.0.0.1]:48549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAVqs-0001te-DH for submit@debbugs.gnu.org; Mon, 03 Feb 2014 21:35:06 -0500 Original-Received: from mail-ee0-f53.google.com ([74.125.83.53]:34591) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAVqp-0001tV-18 for 16621@debbugs.gnu.org; Mon, 03 Feb 2014 21:35:03 -0500 Original-Received: by mail-ee0-f53.google.com with SMTP id t10so3958825eei.26 for <16621@debbugs.gnu.org>; Mon, 03 Feb 2014 18:35:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=zNO02J9UAw0EyfhySZfVYYl/s6t+wIT5TUWmBAZTL8E=; b=l+nNAu1dSaozp/IdGoxaf78stgi1VGyomrorwLYIG3+20ipsvO4PsoFUDohPbfUxvh ruWmoSAaRiacU5O7Rc0no+Y30UNysFpN29UMoUXnbg3+dih0b70PxSmKNXDj/Jz0owaJ IWCpeqAMW4bTrhAvszwoWMRh+qvMHp33EbEPYcgS9ynUaOuHKFvrpqSSTTNUnFe2JFQS 0zA1oXr/8DQjbq/2U+4ijOP/u0wnhSsKOLBjZawnyWHbSo4TPS7JLLRpQpH8eeLO5RZS YhJKsws3iNXaypPCd8PUjVrehKS+hxLNpvY4OMNPegC7ssr4rQ7mA8U7uB3Un7Cl1Yf1 Wrjg== X-Received: by 10.15.67.197 with SMTP id u45mr17433395eex.24.1391481302122; Mon, 03 Feb 2014 18:35:02 -0800 (PST) Original-Received: from [192.168.10.2] (83-54-31.netrun.cytanet.com.cy. [83.168.54.31]) by mx.google.com with ESMTPSA id u7sm82639493eep.11.2014.02.03.18.35.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 18:35:01 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <838utt4gff.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84531 Archived-At: On 02.02.2014 18:39, Eli Zaretskii wrote: > I don't think this is related to overlays, not directly anyway. True, I've seen it without overlays, too, recently. > No, it doesn't stop, at least not with the above recipe. To see that, > type "M-x trace-redisplay RET" while running the above experiment -- > on my system, this causes the flickering to become much more prominent > and never stop, until I exit isearch and type some simple command, > like C-f, afterwards (to remove the echo-area message). I wanted to say there's no such function, but apparently one has to compile Emacs with -DGLYPH_DEBUG to use it. I'll take your word for it. > What you see is result of redrawing the cursor at a very high > frequency. Normally, redrawing the cursor would only flicker the > character below the cursor, but with some fonts, the adjacent > characters are also affected, if the character under the cursor > "overhangs" to the left and/or to the right into the neighboring > character cells -- then Emacs redraws those adjacent characters as > well. Isn't the fact that flickering is at all possible in this scenario, a problem? Doesn't it mean that occasional flickers can still happen under normal conditions (timers with much longer intervals, for example),just that the probability of occurrence is smaller. If I understand you right, all it takes is for timer to fire at just the right moment before the screen updates. > Why is the cursor redrawn with such a high frequency, you ask? > Because of the timer that expires every 10 msec. When some timer > expires, Emacs always triggers redisplay. If it didn't, features like > highlight-tail could not produce their effect. Thank you, I guess that solves the immediate problem with highlight-tail-mode for me (lower the amount of steps, increase the intervals), but one of the reasons I filed this bug is I've been noticing occasional redisplay flickers with Emacs for as long as I can remember. They are a nuisance, and until now they've been impossible to reproduce, for me. > With highlight-tail-mode, I see flickering only when I type text. > This is expected, since typing text modifies the color of the overlays > at a very high frequency (50 Hz with your customizations), which again > requires redrawing the current line and the cursor. If you see > something else with highlight-tail-mode, please describe the recipe. I do see similar flickering from time to time after I stop typing, but that can be chalked up to timers too, I guess. This is also harder to reproduce (happens not often, and in longer-living Emacs sessions). > All of the above is quite normal, so I don't see where there would be > a bug. Granted, Emacs 24.3 and Emacs 23 behave the same. Some relatively low-hanging fruit has already been mentioned in the comments, but would it be too much to expect some sort of double-buffering used for Emacs display, eventually? Or is the related overhead considered too much of a cost?