Subject: Re: bug#70221: [PATCH] New function `funcall-later`

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Apr 2024 09:09:25 +0300

> 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" <[email-masked]>
> 
> 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.)