From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: run-with-timer vs run-with-idle-timer Date: Wed, 9 May 2018 14:00:30 -0600 Organization: XCP-1 Message-ID: <9ca64601-289b-c622-555a-9b5b9b6900aa@lanl.gov> References: <87tvrgd972.fsf@gmail.com> <83a7t8puaw.fsf@gnu.org> <87efikd65q.fsf@gmail.com> <838t8spsd5.fsf@gnu.org> <87tvrgbpys.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1525896032 7450 195.159.176.226 (9 May 2018 20:00:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 May 2018 20:00:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 Cc: emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 09 22:00:28 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGVGF-0001qy-Su for ged-emacs-devel@m.gmane.org; Wed, 09 May 2018 22:00:28 +0200 Original-Received: from localhost ([::1]:58809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGVIM-0008SQ-UY for ged-emacs-devel@m.gmane.org; Wed, 09 May 2018 16:02:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGVHO-0008Qy-0H for emacs-devel@gnu.org; Wed, 09 May 2018 16:01:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGVHK-0004N5-RG for emacs-devel@gnu.org; Wed, 09 May 2018 16:01:38 -0400 Original-Received: from proofpoint7.lanl.gov ([204.121.3.46]:48150) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fGVHK-0004Lu-J9; Wed, 09 May 2018 16:01:34 -0400 Original-Received: from pps.filterd (proofpoint7.lanl.gov [127.0.0.1]) by proofpoint7.lanl.gov (8.16.0.21/8.16.0.21) with SMTP id w49Jvh9K025344; Wed, 9 May 2018 14:00:31 -0600 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint7.lanl.gov with ESMTP id 2hsb0b7nx6-1; Wed, 09 May 2018 14:00:31 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id DF6BA13DF0D4; Wed, 9 May 2018 14:00:30 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from bismuth.lanl.gov (bismuth.lanl.gov [128.165.246.103]) by mailrelay1.lanl.gov (Postfix) with ESMTP id B62F513DF0E4; Wed, 9 May 2018 14:00:30 -0600 (MDT) In-Reply-To: <87tvrgbpys.fsf@gmail.com> Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-09_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=960 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805090186 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 204.121.3.46 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225177 Archived-At: >> An idle timer set for 600 seconds will run when ten minutes have >> elapsed since the last user command was finished, even if subprocess >> output has been accepted thousands of times within those ten minutes, >> and even if there have been garbage collections and autosaves. > > Doesn't this contradict what you told me first? I.e doesn't this > contradict the fact that this never returns? > > (catch 'done > (run-with-idle-timer 600 nil (lambda () (throw 'done nil))) > (while t (accept-process-output nil 0.1))) ; 6 thousand times > > or should the manual be saying "even if subprocesses output has been > non-explictly accepted thousands of times"? No, because whatever command you used to invoke that code (C-x C-e in the trivial case) doesn't finish unless and until the loop finishes. So no time has yet "elapsed since the last user command was finished", regardless of anything about subprocesses. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.