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: 24 Oct 2002 08:06:54 -0400	[thread overview]
Message-ID: <8765vshwgx.fsf@computer.localdomain> (raw)
In-Reply-To: <5xadl4p0xp.fsf@kfs2.cua.dk>

storm@cua.dk (Kim F. Storm) writes:
>(1)
>   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.

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


Indeed.  Your proposal does cover all useful cases.  I like it!



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

IMHO, This one is the only "important" case that does not get covered.
Though it may seldom be needed in practice, it would seem awkward to
leave this out.  

Moreover, providing additional arguments to cover this "missing"
situation would break the backward compatibility of
run-with-idle-timer.  So, this user seconds your proposal!

However, a user who does want to implement the "missing" functionality
will again do weird stuff, as done in blink-cursor-mode and idledo.el.
OTOH, the user can cleanly implement the missing functionality if one
would provide one or more of the following variables.  (I guess one
could also provide appropriate hooks instead of variables.)

idle-timer-idle-counter
 "When running an idle-timer, this variable is (temporarily) bound to
 the number of times the idle-timer has been triggered by emacs going idle.. "

idle-timer-repeat-counter
 "when running an idle-timer, this variable is temporarily bound to
 the number of times the idle-timer has been triggered , either by
 emacs going idle, or by emacs remaining idle. "






DG                                 http://deego.gnufans.org/~deego/
--

  reply	other threads:[~2002-10-24 12:06 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
2002-10-24 12:06               ` D. Goel [this message]
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=8765vshwgx.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).