From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#22993: Potential fix/workaround for 22993 Date: Sun, 10 Jul 2016 15:38:57 +0000 Message-ID: References: <57629b7f841b1a0000aa4164@polymail.io> <20160703091937.GA11931@breton.holly.idiocy.org> <20160707185531.GA12590@breton.holly.idiocy.org> <20160707195759.GB12590@breton.holly.idiocy.org> <20160710095332.GA35411@breton.holly.idiocy.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c063e9e141b4a053749d611 X-Trace: ger.gmane.org 1468165229 20583 80.91.229.3 (10 Jul 2016 15:40:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 15:40:29 +0000 (UTC) Cc: 22993@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 17:40:20 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMGqB-0003N2-Md for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 17:40:19 +0200 Original-Received: from localhost ([::1]:55643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMGq5-0003Lw-Tm for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 11:40:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMGpy-0003KH-Jw for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:40:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMGpu-0001f5-6c for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:40:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMGpu-0001f1-3K for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMGpt-000537-Sl for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2016 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 22993-submit@debbugs.gnu.org id=B22993.146816515519300 (code B ref 22993); Sun, 10 Jul 2016 15:40:01 +0000 Original-Received: (at 22993) by debbugs.gnu.org; 10 Jul 2016 15:39:15 +0000 Original-Received: from localhost ([127.0.0.1]:45319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMGp8-00051D-Sl for submit@debbugs.gnu.org; Sun, 10 Jul 2016 11:39:15 -0400 Original-Received: from mail-io0-f170.google.com ([209.85.223.170]:34045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMGp6-00050r-Vm for 22993@debbugs.gnu.org; Sun, 10 Jul 2016 11:39:13 -0400 Original-Received: by mail-io0-f170.google.com with SMTP id q83so18338148iod.1 for <22993@debbugs.gnu.org>; Sun, 10 Jul 2016 08:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QaHpYIyDU5WNZ47zWdH7Jzi1pmwAk7szIXB70z7p1e0=; b=xwUTZtNcoU0AXjyr3xO7vg3THit9teCvNYrh8iWnYsfPbVDDqr5xscSinaAtsDh3JD dQ+2YHe9409dAEx+uh4YCHQury1CnNG+P/ijheCghoLmt8AwUjEQhkgCVv/phQwmYoQQ pFogefcti7reuryHaZTcTsFFC0zLaZrWZeKXg0E4WAR5ZrecygGLCelGhjlaTEOwXHGp uZlQJG/dctBgDvc2uNDOV4PIzf22ncJ7kkbRqJBBm3ZVX6BvloLAWty33fxPHNcPp9lD sUOHchH8CZ1aUuQh+xaoaqgi1ETxQ+LEsfddbVSEFGLpH5gKNPfaw/7u1xStXP8NifsD rYuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QaHpYIyDU5WNZ47zWdH7Jzi1pmwAk7szIXB70z7p1e0=; b=MkliIAF1f3aTMGiaxCGeVtsOqI4upXRKvPshXBhbpTsD6BxjByR2KTnZoa+bVdigT1 qL2F2TEDr5UVN1oupRew+r0Dir7ONnbvb6Wvr5HzyY2vWSGVs1sQ8JH1dLX6mvRLOHMc 50Ik1d1fjQssMcpVIK9bFJnP9elC/N5oA6yTFR7NF4tfUzvMVV0KxKUGlulVt1ho7fht jdcQ7v7zhl9/3rdCoT/wSvyt7HRApzW4njsUA4Q1fBvU5pOFSlDp7qUhJ07K5HTAiwOv CmAdQtpi16t39Rq++vlg7Jeb/lBOSUYvXqrhmCEsIAWMRYsW65U6qkxStsGfuvokoUGY FKRg== X-Gm-Message-State: ALyK8tIOHwexSDsy6uK1uzstvjiii/VXp378rYZXKMX5zfqrqKyjqQFplCXev7aKx+8bXu+CQoTzYTz/9XQSoA== X-Received: by 10.107.59.201 with SMTP id i192mr16372531ioa.89.1468165147333; Sun, 10 Jul 2016 08:39:07 -0700 (PDT) In-Reply-To: <20160710095332.GA35411@breton.holly.idiocy.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:120761 Archived-At: --94eb2c063e9e141b4a053749d611 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Jul 10, 2016 at 2:53 AM Alan Third wrote: > I've reverted the change, but I'm not keen to make the above changes > because they're not trivial, I don't understand them, and I would > basically be copying and pasting code. I suspect we could have license > issues with that. If anyone knows different feel free to chime in. > I have also tried adding: NSAppSleepDisabled To the plist and it still napped. The code referenced is getting the main bundle, then getting its Info.plist and writing `NSAppSleepDisabled` to be true. I=E2=80=99m sure you can tell = that. What I don=E2=80=99t know is if it actually modifies the Info.plist, or if = it has the same effect as the =E2=80=9Cdefaults write=E2=80=9D work around below. It also appears to not be the =E2=80=9Ccorrect=E2=80=9D[1] way to disable a= ppnap, which, afaict, requires objective c[2]? [1]: http://lists.apple.com/archives/java-dev/2014/Feb/msg00051.html [2]: https://github.com/bitcoin/bitcoin/pull/5804/files > For future reference, here are the known work-arounds for this problem: > > 1. At the command prompt: defaults write org.gnu.Emacs NSAppSleepDisabled > -bool YES > > 2. Right-click on the Emacs icon and select 'get info' and tick the > 'Disable App Nap' checkbox. (Although I don't get that tick box...) > Nor do I, it=E2=80=99d be nice if we knew why this was. > > 3. Run in daemon mode: Emacs as a daemon has no GUI so app nap > is disabled automatically. > > I wonder if it would be worth posting to an apple mailing list about this? It seems to be an edge case=E2=80=94an app that is sometimes a gui+daemon. = I=E2=80=99ve also been unable to find Cocoa equivalents to the APIs mentioned as the proper way to disable app nap (if we could use these, we could begin an activity when a server starts, so app nap would only be disabled in that case). If there were an easy way to detect a tty frame coming into and leaving existence it could even be done around that. --=20 Aaron --94eb2c063e9e141b4a053749d611 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sun, Jul 10, 2016 at 2:53 AM Alan Third <alan@idiocy.org> wrote:
I've reverted the change, but = I'm not keen to make the above changes
because they're not trivial, I don't understand them, and I would basically be copying and pasting code. I suspect we could have license
issues with that. If anyone knows different feel free to chime in.

I have also tried adding:

<= div> <ke= y>NSAppSleepDisabled</key>
<true/>

= To the plist and it still napped.=C2=A0

The code r= eferenced is getting the main bundle, then getting its Info.plist and writi= ng `NSAppSleepDisabled` to be true. I=E2=80=99m sure you can tell that. Wha= t I don=E2=80=99t know is if it actually modifies the Info.plist, or if it = has the same effect as the =E2=80=9Cdefaults write=E2=80=9D work around bel= ow.=C2=A0

It also appears to not be the =E2=80=9Cc= orrect=E2=80=9D[1] way to disable appnap, which, afaict, requires objective= c[2]?

=C2=A0
For future reference, here are the known work-arounds for this problem:

1. At the command prompt: defaults write org.gnu.Emacs NSAppSleepDisabled -= bool YES

2. Right-click on the Emacs icon and select 'get info' and tick the=
=C2=A0 =C2=A0'Disable App Nap' checkbox. (Although I don't get = that tick box...)

Nor do I, it=E2=80=99= d be nice if we knew why this was.
=C2=A0

3. Run in daemon mode: Emacs as a daemon has no GUI so app nap
=C2=A0 =C2=A0is disabled automatically.


=
I wonder if it would be worth posting to an apple mailing list about t= his? It seems to be an edge case=E2=80=94an app that is sometimes a gui+dae= mon. I=E2=80=99ve also been unable to find Cocoa equivalents to the APIs me= ntioned as the proper way to disable app nap (if we could use these, we cou= ld begin an activity when a server starts, so app nap would only be disable= d in that case). If there were an easy way to detect a tty frame coming int= o and leaving existence it could even be done around that.

--
Aaron
--94eb2c063e9e141b4a053749d611--