From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Johan Andersson Newsgroups: gmane.emacs.bugs Subject: bug#24849: Is Emacs put in idle mode when window is not focused? Date: Tue, 1 Nov 2016 21:18:28 +0100 Message-ID: References: <83oa1znpah.fsf@gnu.org> <83wpgnm014.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113fe9824353720540430874 X-Trace: blaine.gmane.org 1478031668 31158 195.159.176.226 (1 Nov 2016 20:21:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2016 20:21:08 +0000 (UTC) Cc: 24849@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 01 21:21:00 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1c1fXZ-0001ZZ-1c for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Nov 2016 21:20:13 +0100 Original-Received: from localhost ([::1]:51090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1fXb-0007rW-Qc for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Nov 2016 16:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1fXS-0007oK-AQ for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 16:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1fXO-00086Z-FM for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 16:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1fXO-00086V-Bm for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 16:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c1fXO-0004PN-1y for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 16:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Johan Andersson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Nov 2016 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24849 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24849-submit@debbugs.gnu.org id=B24849.147803154416869 (code B ref 24849); Tue, 01 Nov 2016 20:20:02 +0000 Original-Received: (at 24849) by debbugs.gnu.org; 1 Nov 2016 20:19:04 +0000 Original-Received: from localhost ([127.0.0.1]:39420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1fWK-0004Nc-MV for submit@debbugs.gnu.org; Tue, 01 Nov 2016 16:19:03 -0400 Original-Received: from mail-qt0-f175.google.com ([209.85.216.175]:33436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1fWI-0004NO-KD for 24849@debbugs.gnu.org; Tue, 01 Nov 2016 16:18:55 -0400 Original-Received: by mail-qt0-f175.google.com with SMTP id p16so101227738qta.0 for <24849@debbugs.gnu.org>; Tue, 01 Nov 2016 13:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burtcorp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=01B/R/nFyVEPHnIgLFkN7NDsnPI51d9XLCmNF6t3+CY=; b=QifVlU+hJCZUxz1ZAJX0+dCmmiCHlhECLrbELL72kC0Fu66Vmu1Md8BDFQPK88zur3 lX/U3Jf2B8CWQnY1rcneRuU3+ZrsnXcc+2g9dSdO36FPx+jmCTV9CFo71fh+P05EJZDU 2ALxHSnMsw5vf8Yg+Fx8es5f6xo2+4CEDptgHwTEXCRWjod7+ALAticn1px+2BY9tDUS hLBIGtSc2w9czmRpdOtKpNrGBYi4JDVC4WG86vdiciYcSfF4nGKnV6s6/4yMvj6bG8gj tnTDrpAv5nsT/rO8w4h+1ToBzqy5F/Uc6Q+3XUfGrSrvxEUE7uVXNb/p5KM/uZCG1kWZ 0HpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=01B/R/nFyVEPHnIgLFkN7NDsnPI51d9XLCmNF6t3+CY=; b=bnqQu3d7GaXsJ6H0kYCkuJ973uNuI3rrSMx0B88xyPWl6WdzrtkSBFJOF5IWCY7+cD sUqIPhwmqcLESFlCI95zEFFXzQzqrvVd9Xbg2dh7RGSufAyjrPdiqhJQ2YFaCtserPMT Xm5BwHDN/V2blAU3sWj/f9JOx3uOSszUqyz6doCxLk2gNjE0mPaCa0xFa8AdlkXtepTT HEoMLAaqOlfH+L7gkjFknl7OcUICm3gaPEBO+EhEUNHfWAmLU+2D2CJdeC+o+BlDkKZC V8VhezHjhM+Rigc4kPOhAJx4DLgGm9dWOT6ocElXxzAexv754oa2hJkrczy4vpP5m+mV 1n/g== X-Gm-Message-State: ABUngvd3sdaG9TqcHKM9h7lYS++6yC3S0EMuTQa5BAW9lxofNb++AH7X+3T6uVZcfaBsdhIF+ao6fwKo6kHy5g== X-Received: by 10.200.54.144 with SMTP id a16mr8563680qtc.104.1478031529163; Tue, 01 Nov 2016 13:18:49 -0700 (PDT) Original-Received: by 10.237.38.33 with HTTP; Tue, 1 Nov 2016 13:18:28 -0700 (PDT) In-Reply-To: <83wpgnm014.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125237 Archived-At: --001a113fe9824353720540430874 Content-Type: text/plain; charset=UTF-8 I added the set-process-filter in case that would make a difference, but I don't think that is the issue here. The issue is that the services (sub processes of Emacs as you say) takes a long time to respond when Emacs is idle. If I run the same command from a terminal, that doesn't happen. On Tue, Nov 1, 2016 at 9:13 PM, Eli Zaretskii wrote: > > From: Johan Andersson > > Date: Tue, 1 Nov 2016 20:48:59 +0100 > > Cc: 24849@debbugs.gnu.org > > > > (let* ((default-directory "/tmp") > > (process (start-process "server" nil "python" "-m" "SimpleHTTPServer" > "8000"))) > > (set-process-filter > > process > > (lambda (_ output) > > ;; ... > > ))) > > > > What happens in practice is that, when I get to work, I select the > services I need and start them (unless > > Emacs was killed, they are already started). Sometimes I use Emacs quite > frequently and then this is not so > > much of an issue because Emacs does not have time to idle. But when I > don't use Emacs for a while, it will > > hang waiting for the response from the service (because Emacs is idle). > > So you are saying that the service, which is a sub-process of Emacs, > produces some output, but Emacs doesn't read that output timely enough > because it's idle? That's not possible, I think: when Emacs is idle, > it is most of the time stuck inside a call to 'pselect', which should > return immediately when some input arrived from a sub-process. > > So I guess I still don't understand something in your setup. But > what? > -- Johan Andersson System Developer, Burt www.burtcorp.com Cell: +46 761 041607 https:// github.com/rejeep | http://twitter.com/rejeep | http://twitter.com/burtcorp --001a113fe9824353720540430874 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I added the set-process-filter in case that would make a d= ifference, but I don't think that is the issue here. The issue is that = the services (sub processes of Emacs as you say) takes a long time to respo= nd when Emacs is idle. If I run the same command from a terminal, that does= n't happen.

On Tue, Nov 1, 2016 at 9:13 PM, Eli Zaretskii <eliz@gnu.org> = wrote:
> From: Johan Andersson <johan.andersson@burtcorp.com>
> Date: Tue, 1 Nov 2016 20:48:59 +0100
> Cc:
24849@debbugs.gnu.org=
>
> (let* ((default-directory "/tmp")
> (process (start-process "server" nil "python" &quo= t;-m" "SimpleHTTPServer" "8000")))
> (set-process-filter
> process
> (lambda (_ output)
> ;; ...
> )))
>
> What happens in practice is that, when I get to work, I select the ser= vices I need and start them (unless
> Emacs was killed, they are already started). Sometimes I use Emacs qui= te frequently and then this is not so
> much of an issue because Emacs does not have time to idle. But when I = don't use Emacs for a while, it will
> hang waiting for the response from the service (because Emacs is idle)= .

So you are saying that the service, which is a sub-process of Emacs,=
produces some output, but Emacs doesn't read that output timely enough<= br> because it's idle?=C2=A0 That's not possible, I think: when Emacs i= s idle,
it is most of the time stuck inside a call to 'pselect', which shou= ld
return immediately when some input arrived from a sub-process.

So I guess I still don't understand something in your setup.=C2=A0 But<= br> what?



--
Johan Andersson
System Developer, Burt
=
Cell: +46 761 041607
--001a113fe9824353720540430874--