From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: idledo.el v. 0.3
Date: 24 Oct 2002 12:48:34 +0200 [thread overview]
Message-ID: <5xadl4p0xp.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <87bs5kbuzm.fsf@computer.localdomain>
"D. Goel" <deego@gnufans.org> writes:
> 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)
> [...]
(1) almost described what I had in mind:
If REPEAT is non-nil, do the action each time Emacs has been idle
for exactly SECS seconds.
If REPEAT is a number, keep repeating the action every REPEAT
seconds as long as emacs remains idle; otherise, only do the action
once for each time Emacs becomes 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 subsequent 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...
Yes, formally it makes more sense, but I cannot see any purpose for that
functionality -- whereas the proposed functionality is definitely useful!
> OTOH, the first one would (incompletely) mix
> the 2 different booleans/numbers into one REPEAT..
Yes, it is true that with my proposal it is not possible to specify an
idle timer which is repeated while emacs remains idle, but does not
get repeated the next time emacs becomes idle --- but again, I really
don't see much use for that functionality either.
So although the proposed "overloading" of the REPEAT argument for
run-with-idle-timer does not cover every possible combination, I think
it covers all the practical functions (in all cases the action is first
executed SECS seconds after emacs becomes idle):
- not repeating the idle action at all (REPEAT = nil)
- repeating (once) every time emacs becomes idle (REPEAT = t)
- repeating every time emacs becomes idle, and then every REPEAT
seconds while emacs remains idle (REPEAT = number)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-10-24 10:48 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
2002-10-23 23:51 ` D. Goel
2002-10-24 10:48 ` Kim F. Storm [this message]
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=5xadl4p0xp.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--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).