unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Phil Sainty <psainty@orcon.net.nz>, 37875@debbugs.gnu.org
Subject: bug#37875: 27.0.50; `run-with-timer' not documented in (elisp)Timers
Date: Mon, 28 Oct 2019 16:55:02 +0100	[thread overview]
Message-ID: <87o8y0986h.fsf@gnus.org> (raw)
In-Reply-To: <87v9sg0wtq.fsf@web.de> (Michael Heerdegen's message of "Wed, 23 Oct 2019 09:01:37 +0200")

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Phil Sainty <psainty@orcon.net.nz> writes:
>
>> I just noticed that `run-with-timer' is not mentioned anywhere
>> in the elisp manual.
>>
>> (elisp)Timers even mentions `run-with-idle-timer', which also has
>> its own node at (elisp)Idle Timers; however `run-with-timer' is
>> not pointed out.
>
> It mentions `run-at-time' which is ... quite the same?  I share your
> confusion: seems the commands `run-at-time' and `run-with-timer' can be
> merged and one can be made an alias for the other.

The definition is:

(defun run-with-timer (secs repeat function &rest args)
[...]
  (apply 'run-at-time secs repeat function args))

So that's a kinda strange function to have?

It's used about 50 places in the in-tree code; run-at-time is used about
80 places.  run-at-time has a better name, I think, but run-with-timer
has a name that's analogous to run-with-idle-timer.

Does anybody know why run-with-timer was added?  I think we should
obsolete one or the other, and I think run-at-time has the best name.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-10-28 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 18:38 bug#37875: 27.0.50; `run-with-timer' not documented in (elisp)Timers Phil Sainty
2019-10-23  7:01 ` Michael Heerdegen
2019-10-28 15:55   ` Lars Ingebrigtsen [this message]
2019-10-28 17:00     ` Eli Zaretskii
2019-10-29 11:20       ` Lars Ingebrigtsen
2019-10-29 11:34         ` Phil Sainty
2019-10-29 12:31         ` Eli Zaretskii
2019-10-29 12:37           ` Lars Ingebrigtsen
2019-10-29 12:41             ` Eli Zaretskii
2019-10-29 21:22               ` Lars Ingebrigtsen

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=87o8y0986h.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37875@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=psainty@orcon.net.nz \
    /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).