From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#37875: 27.0.50; `run-with-timer' not documented in (elisp)Timers Date: Wed, 30 Oct 2019 00:34:33 +1300 Message-ID: <2d52039c-5ba3-0ac5-b514-8e3bf00a6aad@orcon.net.nz> References: <7a3175eb-dc19-afe7-b5fa-964eabf31ace@orcon.net.nz> <87v9sg0wtq.fsf@web.de> <87o8y0986h.fsf@gnus.org> <831ruwst2u.fsf@gnu.org> <87wocn23y1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="85164"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: michael_heerdegen@web.de, 37875@debbugs.gnu.org To: Lars Ingebrigtsen , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 29 12:35:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPPmJ-000M34-Gr for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2019 12:35:11 +0100 Original-Received: from localhost ([::1]:55192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPPmH-0005NT-OO for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2019 07:35:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38726) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPPmB-0005M3-QL for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 07:35:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPPmA-0002Ww-SB for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 07:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPPmA-0002Ws-P3 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 07:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPPmA-0006KV-IM for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 07:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2019 11:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37875 X-GNU-PR-Package: emacs Original-Received: via spool by 37875-submit@debbugs.gnu.org id=B37875.157234887924299 (code B ref 37875); Tue, 29 Oct 2019 11:35:02 +0000 Original-Received: (at 37875) by debbugs.gnu.org; 29 Oct 2019 11:34:39 +0000 Original-Received: from localhost ([127.0.0.1]:46963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPPln-0006Jr-0u for submit@debbugs.gnu.org; Tue, 29 Oct 2019 07:34:39 -0400 Original-Received: from smtp-2.orcon.net.nz ([60.234.4.43]:58703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPPlj-0006Jh-UX for 37875@debbugs.gnu.org; Tue, 29 Oct 2019 07:34:37 -0400 Original-Received: from [116.251.203.173] (port=39130 helo=[192.168.20.103]) by smtp-2.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1iPPlg-0006Gv-GW; Wed, 30 Oct 2019 00:34:32 +1300 In-Reply-To: <87wocn23y1.fsf@gnus.org> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170360 Archived-At: On 30/10/19 12:20 AM, Lars Ingebrigtsen wrote: > Not really -- I wondered why there were two functions (run-with-timer > and run-at-time) that are identical. > > It could be made into a defalias at least -- the run-at-time doc string > is much better than the run-with-timer one. I think the point is this: (run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS) (run-with-timer SECS REPEAT FUNCTION &rest ARGS) (run-at-time TIME REPEAT FUNCTION &rest ARGS) `run-with-timer' is the non-idle analog of `run-with-idle-timer', with a documented expectation that one passes it a number of seconds as its first argument SECS, being the timeout to use. So if I see either `run-with-timer' or `run-with-idle-timer' then I know I'm looking at a timeout argument in seconds. `run-with-time' has a different argument, TIME, which *may* be a number of seconds (and therefore `run-with-timer' can be defined in terms of this); but ostensibly it's a more general function. I'd argue for keeping them both. If anything, I'd be inclined to add validation to `run-with-timer' to check that an integer was passed. -Phil