From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: run-with-timer vs run-with-idle-timer Date: Wed, 09 May 2018 20:15:23 +0100 Message-ID: <87tvrgbpys.fsf@gmail.com> References: <87tvrgd972.fsf@gmail.com> <83a7t8puaw.fsf@gnu.org> <87efikd65q.fsf@gmail.com> <838t8spsd5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1525893255 14660 195.159.176.226 (9 May 2018 19:14:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 May 2018 19:14:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 09 21:14:11 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 1fGUXP-0003c1-L8 for ged-emacs-devel@m.gmane.org; Wed, 09 May 2018 21:14:07 +0200 Original-Received: from localhost ([::1]:58599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGUZW-0002ij-AQ for ged-emacs-devel@m.gmane.org; Wed, 09 May 2018 15:16:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGUYp-0002hb-HM for emacs-devel@gnu.org; Wed, 09 May 2018 15:15:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGUYm-0000ym-3I for emacs-devel@gnu.org; Wed, 09 May 2018 15:15:35 -0400 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:40655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGUYl-0000yP-Qg; Wed, 09 May 2018 15:15:32 -0400 Original-Received: by mail-wm0-x22a.google.com with SMTP id j5-v6so283660wme.5; Wed, 09 May 2018 12:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=aOH7/0PnW4Yn7yrxgV5QAv2M/HKa66bcFxCnFxlmyhs=; b=pdrdN3Pvtfksstm8OL2PkjHVClQjLc3RowoLQU9IsguSMTZucmJpN4Rciurkgqgd+j wT87CUPR/3lkksKQJbvWKr7hrMyGrAufWWJ8IABpnUt1wfMZ+eLvBaN+lslX6FBgYWI3 IDuTPFXLbMB4zLw6Qn4QwB7cCFORNJP/nV5Cn9+LSuScXWJcB9Dn4C0NJuw9JH52OR4p Tf/RVi6140oGsNRhUzAwQYHA0NOxr9MHI1wMCCA2D2uJ8z7IfnajF82o62mYFe+kWzEw V5GHCw3EQnGoBvZEJUVk1OO8t6rWbTCR+5SRwqD2l+aEjhXtjukLsnq4Sq+7UH7EO2pm I85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=aOH7/0PnW4Yn7yrxgV5QAv2M/HKa66bcFxCnFxlmyhs=; b=RxQIiUxMM1Y3CVmmv6hFqV1BEEoZ8J9s8hO+OyA2/11TI2aT1CK4bBsiJQa+v8OOvd cKyOAFYjX+Xu8X8RM/SQbvs1AjBgs0CgS71rwY1ddyt5TyBTDCq3NFBotZjdZdMDIN3G D44cQnRJHnmGyEyFoY+MeB3yJLLXOjzvVjERB1bJBxnhfH6TUzVFB/mE7ZTTFI4SMSmm lXjZWFeE3ScC8suIcEgzqOchJC1TgIA7W9JOVKC9J/X0cMQuyCn0jpqeHTbw7xoKbaZR XCfe+v86naACLaAzJorFNBk+C2W9ht55+Px9bZmViNrjYwzSwF8QTygYTeM1MQumxvjd EFBA== X-Gm-Message-State: ALQs6tBfWwPlCoxzM6mVFzJh6hOPUNH494ubNcpvqeQnThdiEoTOcCCq LuBXXDcMKqubCZdhftQ1tM7F0WfO X-Google-Smtp-Source: AB8JxZo6qnJrBnJT38nWabAYU9LOkCrADqZh1Z2pI7TN4ByJPUSJX0lLLgGdK4oVsmY9H7Q4drNO+g== X-Received: by 2002:a50:934b:: with SMTP id n11-v6mr29032279eda.77.1525893330465; Wed, 09 May 2018 12:15:30 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id y63-v6sm7188987edy.63.2018.05.09.12.15.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 12:15:29 -0700 (PDT) In-Reply-To: <838t8spsd5.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 09 May 2018 21:59:50 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a 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:225174 Archived-At: Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Cc: emacs-devel@gnu.org >> Date: Wed, 09 May 2018 19:40:17 +0100 >>=20 >> > Emacs considers itself idle only when it waits for input in its >> > main loop. >>=20 >> Two follow-up questions (1) is this by design? > > I wasn't there when this was designed, but it certainly looks like > that, because accept-process-output calls wait_reading_process_output > in a way that avoids reading from keyboard or the rest of input > events. So that suggests that keyboard-idleness should be preserved while waiting for subprocess output. But it's what you quoted next that confuses me. > 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"? Jo=C3=A3o