From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Power: blink-cursor-mode is a pig Date: Fri, 30 Dec 2011 15:46:10 +0100 Message-ID: <87wr9ekthp.fsf@wanadoo.es> References: <4EFCFDCA.6060802@dancol.org> <87vcoytb53.fsf@gnuvola.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1325256396 7212 80.91.229.12 (30 Dec 2011 14:46:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2011 14:46:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 30 15:46:31 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rgdj4-0002N0-3I for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2011 15:46:30 +0100 Original-Received: from localhost ([::1]:49262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rgdj3-00034J-MY for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2011 09:46:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:32847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rgdj0-000343-Lu for emacs-devel@gnu.org; Fri, 30 Dec 2011 09:46:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rgdiz-00080F-Mw for emacs-devel@gnu.org; Fri, 30 Dec 2011 09:46:26 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:47248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rgdiz-00080B-FB for emacs-devel@gnu.org; Fri, 30 Dec 2011 09:46:25 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rgdix-0002IY-R6 for emacs-devel@gnu.org; Fri, 30 Dec 2011 15:46:23 +0100 Original-Received: from 225.red-79-147-11.dynamicip.rima-tde.net ([79.147.11.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 15:46:23 +0100 Original-Received: from ofv by 225.red-79-147-11.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 15:46:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 225.red-79-147-11.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:QwDL0L0wufypkp3RIRFbNvrQOhE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:147057 Archived-At: Thien-Thi Nguyen writes: > () Daniel Colascione > () Thu, 29 Dec 2011 15:54:50 -0800 > > Is there an easier way of stopping the blink-cursor timer than plumbing > new events through the Emacs core, or turning blink-cursor off? One easy thing to do (at the Elisp user level) is to turn off blink-cursor-mode off after N seconds of inactivity. That has the advantage of working while Emacs has the focus too. > I don't think so. > > Why don't you try adding a ‘focus-lost’ event? > > Another (higher-level) approach is to make Emacs recognize > a "go into powersave mode" message (via dbus or whatever). > Then, ‘blink-cursor-mode’ can DTRT w/ the provided hook. Such event makes no sense. AFAIK it is a CPU feature, with the OS having a marginal involvement. Then, it is turned off when significant CPU activity arises, which is, precisely, what an event handler would cause (that's why the OP is trying to turn off the timer associated with blink-cursor-mode.) > Or perhaps you can trigger on the ‘iconify-frame’ event, > but you would need to iconify Emacs for that. This would > work well w/ ratpoison, for example. IMO with ratpoison and similar window managers only a minority of Emacs users would be coveverd.