From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: idledo.el v. 0.3 Date: 27 Oct 2002 00:51:19 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xbs5gddaw.fsf@kfs2.cua.dk> References: <87wuobakqz.fsf@computer.localdomain> <5xfzuyqbxo.fsf@kfs2.cua.dk> <874rbduxdf.fsf@computer.localdomain> <5xbs5ljj6s.fsf@kfs2.cua.dk> <87u1jcq1ex.fsf@computer.localdomain> <5xy98ozpfj.fsf@kfs2.cua.dk> <5x8z0mzxuo.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035669249 24137 80.91.224.249 (26 Oct 2002 21:54:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Oct 2002 21:54:09 +0000 (UTC) Cc: storm@cua.dk, deego@gnufans.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 185Yse-0006Gx-00 for ; Sat, 26 Oct 2002 23:54:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 185Yvz-000418-00 for ; Sat, 26 Oct 2002 23:57:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 185YrK-0000xV-00; Sat, 26 Oct 2002 17:52:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 185Ypz-0007Rb-00 for emacs-devel@gnu.org; Sat, 26 Oct 2002 17:51:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 185Ypu-0007RP-00 for emacs-devel@gnu.org; Sat, 26 Oct 2002 17:51:19 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 185Ypu-0007RD-00; Sat, 26 Oct 2002 17:51:14 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id A82CA7C017; Sat, 26 Oct 2002 21:51:11 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8824 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8824 Richard Stallman writes: > Add a new function: > > (timer-idle-timer-first-invocation-p TIMER) > > which allows an idle-timer action to check whether this is the first > invocation of the timer after emacs becoming idle, or a repeated > activation. > > Is there an actual need for this, or just a theoretical need? You > could do it easily enough by setting a flag variable when the timer > runs, and clearing it using timer-no-longer-idle-hook. True, it is strictly not needed, since the hook can use a boolean to know whether it was repeated (or activated at all)... However, since that information which is already recorded in the timer vector, it seemed natural (and friendly :-) to give the hook easy access to that information. > > Add a new hooks: > > timer-no-longer-idle-hook > > [Implementation: Run from the above mentioned pre-command hook.] > > This is a useful feature, but why not use pre-command-hook directly? Because the pre-command-hook is called for all command - also when emacs hasn't been idle; that seems highly wasteful to me. I'll make a patch for the proposed features; then you can see how much of that you want me to install.