From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51094: Check if run-with{-idle, }-timer needs to create a timer Date: Fri, 08 Oct 2021 11:46:00 +0100 Message-ID: <87a6jjn6af.fsf@tcd.ie> References: <87a6jj97u1.fsf@posteo.net> Reply-To: "Basil L. Contovounesios" Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51094@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 08 12:47:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYnPE-00092T-0n for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Oct 2021 12:47:12 +0200 Original-Received: from localhost ([::1]:54288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYnPB-0002Sv-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Oct 2021 06:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYnP4-0002Se-ES for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 06:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37758) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYnP4-0002IM-6J for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 06:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYnP4-0005tA-0y for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 06:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Oct 2021 10:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51094-submit@debbugs.gnu.org id=B51094.163368997322573 (code B ref 51094); Fri, 08 Oct 2021 10:47:01 +0000 Original-Received: (at 51094) by debbugs.gnu.org; 8 Oct 2021 10:46:13 +0000 Original-Received: from localhost ([127.0.0.1]:49304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYnOH-0005s1-3V for submit@debbugs.gnu.org; Fri, 08 Oct 2021 06:46:13 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:45044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYnOC-0005rU-9s for 51094@debbugs.gnu.org; Fri, 08 Oct 2021 06:46:11 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id s15so28505246wrv.11 for <51094@debbugs.gnu.org>; Fri, 08 Oct 2021 03:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MAvbaeUDhh2MCpWe2npK9wMTJOrTxytxziiylP5WmdE=; b=Pm/yWEIhXWGInF9Nsg1LnrQMFBJgZwkyt+I7Mn89RmeiwrYHZzCL4SWfSt5Wk8/7zw v1Zn6ElfcZ1zPpS9tgVXL4JZyAkjaZRh3WLRpj+BTTtnf8n7x02Jgazk/sOB9xOwxWTS sZA/7zpFbDchY1Xbq1WalGSpbpwrmSmrAOUVL5HMOywpa1ljDLx4HwVPG8WLpK+TtFpd QcntLmtGghR9kRy6BekKrR8Y3Jp6lbut1bjLRZVNxcjOkY6Zbeuv4EAIVaOy+XBEt+Ch 9F2/0rtnfBig8ixVEaaJPlbSar/IsgAazXNqphHXF/hYx36riqH+NmGsz4RU4hpJDRWz yfrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MAvbaeUDhh2MCpWe2npK9wMTJOrTxytxziiylP5WmdE=; b=iwMa58CweANukNvAR9X3ZQ2v/snlid2jJ6NkBoP3AMvOYstitjhdoYAeUQafXCVD8O FA50VUBghLx28mRKoeJgETppnnbX5Av74kGpkdWB00XPEivnuITjvty4glIjNhig6slU VnsdzPpZqaLQo/ou1oJixha4fXevg2k1mLZ13wYoqUs46v4J8FD0HENLQ/UTAUN05uvi L5sGxQTLBezxfhqG/cBYvBvJIHeiHsW/0yCGVwCkvcIvtfvDvIeHqg4Tx3/rANEEGoda WUjpqba68mTC0Tqf/GbUqD2+DEEmC7Iin9pxiFxENWPfblp1Od4E8my4iiRZvvYyXr+I G9aA== X-Gm-Message-State: AOAM530AGVJrDsRdjNx2UMSB6mqW2fixIaVtbj8e+7mx0mF8hwh2S++J C5FcpdU/P/ej2I5t7pdXBnqeRw== X-Google-Smtp-Source: ABdhPJzV2l/Uhhea3SeStgPYheW3G73lsVYjV2E4nTL2BYKX850eAM95M3G1UTXz8YOBPCspLfl6qw== X-Received: by 2002:a05:6000:18cf:: with SMTP id w15mr3046173wrq.314.1633689962374; Fri, 08 Oct 2021 03:46:02 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id v1sm2164744wro.54.2021.10.08.03.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 03:46:01 -0700 (PDT) In-Reply-To: <87a6jj97u1.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 08 Oct 2021 09:36:22 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216702 Archived-At: Philip Kaludercic [2021-10-08 09:36 +0000] wrote: > I have seen a few packages use run-with-timer or run-with-idle-timer, > where the SECS parameter is configurable with a user option. When this > timer doesn't repeat itself and it makes sense to set SECS to 0 when you > want something to run immediately, I don't think it makes sense to > create a timer object. IIUC, the semantics of SECS=0 (alias nil) is not the same as eager funcall, because timer functions are intended to be run asynchronously in a separate command loop. So often what is meant by "now" is e.g. "as soon as I quit the current active minibuffer". I realise this patch does not touch run-at-time, but it's documented as being interchangeable with run-with-timer, so the eager funcall sounds like a breaking change. If packages indeed want to run something immediately, why create a timer at all? Or am I misunderstanding something? Thanks, -- Basil