From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: D. Goel Newsgroups: gmane.emacs.devel Subject: Re: idledo.el v. 0.3 Date: 23 Oct 2002 19:23:09 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <87bs5kbuzm.fsf@computer.localdomain> 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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035416580 25808 80.91.224.249 (23 Oct 2002 23:43:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 23:43:00 +0000 (UTC) Cc: 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 184V9O-0006i3-00 for ; Thu, 24 Oct 2002 01:42:58 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 184VBJ-0004KO-00 for ; Thu, 24 Oct 2002 01:44:57 +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 184V95-00020C-00; Wed, 23 Oct 2002 19:42:39 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 184V7l-0001DO-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 19:41:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 184V7j-0001DA-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 19:41:16 -0400 Original-Received: from 24-197-159-102.charterga.net ([24.197.159.102] helo=computer) by monty-python.gnu.org with esmtp (Exim 4.10) id 184UqO-0007Fn-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 19:23:21 -0400 Original-Received: from deego by computer with local (Exim 3.36 #1 (Debian)) id 184UqE-0001PN-00; Wed, 23 Oct 2002 19:23:10 -0400 Original-To: storm@cua.dk (Kim F. Storm) X-Face: "p/v9J8=S2*s}DfZ-:.li?No&/cFtNt5?~xJBn1&M!s7;LkMg[q@o*COk:?QGvQVt,-34q7 ,Bn-_uph,+$dkf8HOP==kgg:o7;Y,+F/3wC_{YqPteeqTjs+Ey=V%n^|gWVbO(VCMt/s^RWLpl#= In-Reply-To: <5xy98ozpfj.fsf@kfs2.cua.dk> Original-Lines: 57 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 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:8706 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8706 storm@cua.dk (Kim F. Storm) writes: > > If you look at run-with-timer, the REPEAT parameter may be an > integer/float indicating a repeat period for the timer, while for > run-with-idle-timer, repeat is just a boolean. > > IMO, the clean enhancement to timer.el would be to allow REPEAT to be > a number for run-with-idle-timer as well. run-with-idle-timer (secs repeat function &rest args) Current functionality: If REPEAT is non-nil, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). Are you suggesting instead that: (1) If REPEAT is t, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). It REPEAT is a number, keep repeating the action for REPEAT seconds as long as emacs remains idle. or that: (2) If REPEAT is t, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). If REPEAT is a number, do the action each time Emacs has been idle for exactly REPEAT seconds (that is, only once for each time Emacs becomes idle). ? The second one makes more sense to me, since REPEAT in run-with-idle-timer deals not with repeat-while-idle but with REPEAT-when-next-idle... OTOH, the first one would (incompletely) mix the 2 different booleans/numbers into one REPEAT.. (Of course, if the seocnd option is what happens, or if none of the two happen, we still haven't provided the functionality of 'repeating as long as emacs remains' idle.. for which one could have new function named as, say run-while-idle-timer. ) PS: run-with-idle-timer indeed has more "degrees of freedom" than does "run-with-timer"... DG http://deego.gnufans.org/~deego/ --