unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: D. Goel <deego@gnufans.org>
Cc: emacs-devel@gnu.org
Subject: Re: idledo.el v. 0.3
Date: 23 Oct 2002 19:23:09 -0400	[thread overview]
Message-ID: <87bs5kbuzm.fsf@computer.localdomain> (raw)
In-Reply-To: <5xy98ozpfj.fsf@kfs2.cua.dk>

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/
--

  reply	other threads:[~2002-10-23 23:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wuobakqz.fsf@computer.localdomain>
     [not found] ` <5xfzuyqbxo.fsf@kfs2.cua.dk>
     [not found]   ` <874rbduxdf.fsf@computer.localdomain>
     [not found]     ` <5xbs5ljj6s.fsf@kfs2.cua.dk>
     [not found]       ` <87u1jcq1ex.fsf@computer.localdomain>
2002-10-23 23:49         ` idledo.el v. 0.3 Kim F. Storm
2002-10-23 23:23           ` D. Goel [this message]
2002-10-23 23:51             ` D. Goel
2002-10-24 10:48             ` Kim F. Storm
2002-10-24 12:06               ` D. Goel
2002-10-24 15:05                 ` Kim F. Storm
2002-10-24 14:25                   ` D. Goel
2002-10-25  5:35                 ` Richard Stallman
2002-10-25  5:34           ` Richard Stallman
2002-10-25  9:11             ` Kim F. Storm
2002-10-26 20:15               ` Richard Stallman
2002-10-26 22:51                 ` Kim F. Storm
2002-10-28 19:19                   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bs5kbuzm.fsf@computer.localdomain \
    --to=deego@gnufans.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).