From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Why do idle timers trigger redisplay? Date: Fri, 12 Feb 2016 08:38:37 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1455303401 24491 80.91.229.3 (12 Feb 2016 18:56:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Feb 2016 18:56:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 12 19:56:31 2016 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 1aUItI-0006eV-Fa for ged-emacs-devel@m.gmane.org; Fri, 12 Feb 2016 19:56:28 +0100 Original-Received: from localhost ([::1]:35438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUItH-0007vY-Om for ged-emacs-devel@m.gmane.org; Fri, 12 Feb 2016 13:56:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUGk2-00081d-NG for emacs-devel@gnu.org; Fri, 12 Feb 2016 11:38:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUGk1-0000TR-Mm for emacs-devel@gnu.org; Fri, 12 Feb 2016 11:38:46 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:52901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUGjw-0000Pn-Oh; Fri, 12 Feb 2016 11:38:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=lswGzWQ9A/LJVxhM/g/eruWV+x6GS2w7Ijs/CPu16yE=; b=2F3p6sXK/zRbe5cbIv0vd1gU69hgeJQ5jpS+Olwnz/xpi7niCMA1TbYYrhVFRu/UONdDKWjrRIPzS+axBl/UXYyIUosaWrsaLnmKsXVayTvpnM8vNXUkb6Htj1xr+q8m; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49754 helo=server.private.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1aUGjp-0001E0-VC; Fri, 12 Feb 2016 11:38:34 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 50.28.13.150 X-Mailman-Approved-At: Fri, 12 Feb 2016 13:56:25 -0500 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:199828 Archived-At: Thank you, Eli, for helping me to better understand why code run by timers is considered input that triggers redisplay (which in turn figures out what to do). As always, your tutoring is greatly appreciated. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Fri, 12 Feb 2016 10:25:51 +0200, Eli Zaretskii wrote: > > > Date: Thu, 11 Feb 2016 16:14:44 -0800 > > From: Keith David Bershatsky > > > > Question, please: Is it a necessary evil that the `timer-idle-list` must always trigger a redisplay? > > Emacs does another redisplay cycle each time there was some kind of > input. The logic of this is that any input could potentially affect > what is displayed (the job of figuring out what, if anything, does > need to be redrawn is integral part of what redisplay does, and it > might as well conclude that no redisplay is actually needed). > > Code run by timers is one such kind of input, since any code run by > timers runs with the purpose of doing something with Emacs data: > buffers, strings, windows, frames, etc. > > Other kinds of input include: keyboard input, input from subprocesses, > mouse gestures, events that come from sources like D-bus and file > notifications, etc. They all cause a cycle of redisplay.