Subject: bug#16621: 24.3.50; Periodic timer + overlays = flickering near point

From: Dmitry Gutov <[email-masked]>
Date: Sun, 02 Feb 2014 03:01:26 +0200

It happens with different overlays, and with the default monospaced font
of my system (Ubuntu GNU/Linux), but it's easiest to reproduce doing
isearch, and using Fira Mono (TrueType version, available from
https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/,
see the bottom of the page). Steps from emacs -Q:

1. Evaluate (run-at-time nil 0.01 'ignore)

2. Evaluate (set-face-attribute 'default nil :height 105 :family "Fira Mono")

This is optional, but with the default font the flickering is harder to
reproduce.

3. Open a text file press C-s (or C-r), enter some letters, preferably
common to that file, press C-s or C-r again. Repeat multiple times.
Maybe do that for a couple of minutes, even.

4. Observe flickering letters, usually one to the left, or one to the
right of the cursor.

Most of the time the flickering happens 2 or 3 times and stops, but I've
managed to record a couple of semi-stable loops of this on video, see
the attachment. It demonstrates a somewhat extreme situation, usually I
only see flickering once every handful searches or so.

This is in no way limited to isearch. For example, I can also see it
when typing, when using the fancy highlight-tail-mode
(http://www.emacswiki.org/emacs-en/highlight-tail.el), at least with
settings highlight-tail-steps 14, highlight-tail-timer 0.02.

Let me know if the video format (h264) is not acceptable.

In GNU Emacs 24.3.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
 of 2014-02-01 on axl
Repository revision: 116234 [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description:	Ubuntu 13.10