From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70221: [PATCH] New function `funcall-later` Date: Sat, 06 Apr 2024 09:09:25 +0300 Message-ID: <8634rz58fe.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70221@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 06 08:10:22 2024 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 1rszFu-0008O6-0I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Apr 2024 08:10:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rszFW-0001Ce-DQ; Sat, 06 Apr 2024 02:09:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rszFV-0001CV-3K for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 02:09:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rszFU-00071m-Qa for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 02:09:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rszFa-00029A-II for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 02:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2024 06:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70221 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70221-submit@debbugs.gnu.org id=B70221.17123837838126 (code B ref 70221); Sat, 06 Apr 2024 06:10:02 +0000 Original-Received: (at 70221) by debbugs.gnu.org; 6 Apr 2024 06:09:43 +0000 Original-Received: from localhost ([127.0.0.1]:37967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rszFH-00026z-3t for submit@debbugs.gnu.org; Sat, 06 Apr 2024 02:09:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rszFE-000269-HQ for 70221@debbugs.gnu.org; Sat, 06 Apr 2024 02:09:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rszF3-0006yW-4J; Sat, 06 Apr 2024 02:09:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=u8bnQubwoWUZQriMiK5f52AklUsm7JDj+AygGlIxDRw=; b=fwdRMPoeVOG1 fqiDNeNOlbIAJejT3xMTCx2Ng261l2QMK0eKo8BM7J7pLqBfYhtKuF7EpOWyCaTUec7c6ZcCPdZ+d BAWDpYH67OWQjRyaSifIGCjtVr1gfL7Gal6kjeKRK7rG8fHi/GAcBwFTH6Itsk6vQf8npo66KuFwN hhuzzMJ72kv47R1GHTKH0Ntqf/qMxGqdJk4nM1MecHHxsyxiLvIqbo4wAp0urpscRbZs//1cGoi/M IO/Vivg68tatASHaUn1QX+8aj0EgNKsJc19u7HkrHH72sgd6wtnWCMb0/0/xHsbzkdIdI+e3yXXmF 9ZlJY6UCSPM2XQ7n3s7b9A==; In-Reply-To: (bug-gnu-emacs@gnu.org) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282738 Archived-At: > Date: Fri, 05 Apr 2024 15:56:40 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > In the patch(es) below I suggest the addition of a new function > `funcall-later` which exposes the already existing `pending_funcalls` > mechanism to ELisp and fixes it so those are processed in the correct > order and so they're not just thrown away when used in batch mode. > > `run-with-timer` does largely the same thing when passed a 0 timeout > and no repetition, but it is a bit more costly and relies on the timers, > which don't work as well in batch mode. Thanks. We should document this in the ELisp manual, and should explain there the meaning of "at the next convenient time". (I think "convenient" here is very much misleading and thus inappropriate.)