unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: 22993@debbugs.gnu.org
Subject: bug#22993: Potential fix/workaround for 22993
Date: Sun, 10 Jul 2016 15:38:57 +0000	[thread overview]
Message-ID: <CAHyO48ze=NuNWKf-AE4FfxHso7iOsMc5H3s7fgVbRHXmrW+UFw@mail.gmail.com> (raw)
In-Reply-To: <20160710095332.GA35411@breton.holly.idiocy.org>

[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]

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:

<key>NSAppSleepDisabled</key>
<true/>

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’m sure you can tell that.
What I don’t know is if it actually modifies the Info.plist, or if it has
the same effect as the “defaults write” work around below.

It also appears to not be the “correct”[1] way to disable appnap, 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’d 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—an app that is sometimes a gui+daemon. I’ve
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.

-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 3100 bytes --]

  reply	other threads:[~2016-07-10 15:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12  6:07 bug#22993: 25.0.92; OS X app nap slows down tty emacsclient Aaron Jensen
2016-03-12  8:03 ` bug#22993: Potential fix/workaround for 22993 Aaron Jensen
2016-06-10 18:40   ` Alan Third
2016-06-11 15:51     ` Aaron Jensen
2016-06-11 16:19       ` Alan Third
2016-06-11 16:23         ` Aaron Jensen
2016-06-15 20:35   ` Alan Third
2016-06-16 13:47     ` Aaron Jensen
     [not found]     ` <57629b7f841b1a0000aa4164@polymail.io>
2016-07-03  9:19       ` Alan Third
2016-07-03 17:23         ` Aaron Jensen
2016-07-07 18:55           ` Alan Third
2016-07-07 19:08             ` Aaron Jensen
2016-07-07 19:09               ` Aaron Jensen
2016-07-07 19:57               ` Alan Third
2016-07-08  5:29                 ` Aaron Jensen
2016-07-10  9:53                   ` Alan Third
2016-07-10 15:38                     ` Aaron Jensen [this message]
2016-07-10 16:11                       ` Alan Third
2021-07-01 20:47     ` Alan Third
2021-07-02 17:43       ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyO48ze=NuNWKf-AE4FfxHso7iOsMc5H3s7fgVbRHXmrW+UFw@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=22993@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).