unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Guido Van Hoecke <guivho@gmail.com>
To: Mark Simpson <verdammelt@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Emacs fails to create frame at boot of OSX
Date: Mon, 3 Nov 2014 10:44:53 +0100	[thread overview]
Message-ID: <CAEySM9Fm+MzUMigwvAiyZST-BYxpOA4ar8qTvbPfPupOqtVf+w@mail.gmail.com> (raw)
In-Reply-To: <m2lho39h97.fsf@gmail.com>

Hi Marc

On 26 October 2014 12:56, Mark Simpson <verdammelt@gmail.com> wrote:

> >>>>> On Sun, 26 Oct 2014 11:25:23 +0100, Guido Van Hoecke <
> guivho@gmail.com> said:
>
>     Guido> When I boot my iMAC all apps that were running at the
>     Guido> previous shutdown are restarted by OSX. So Emacs is also
>     Guido> started, but fails to create its frame. It just hangs without
>     Guido> frame. I have to kill it and restart it. That always
>     Guido> succeeds.
>
> Guido -
>
> You are not the only person with this problem - I have it too. Also it
> sometimes happens after simply closing Emacs and trying to restart it,
>
​
Fortunately this is utterly rare here, but then, I seldom close Emacs :)
​


> without rebooting the machine.


​Just describing my current workaround, maybe it can help people suffering
from this problem.

Moved /usr/bin/emacs to /usr/bin/emacs_OSX and created a /usr/bin/emacs
script with following one-liner:
      open -a /Applications/Emacs.app

Used Automator to create a 'Utilities, Runs Shell Script' Application to
run following script:
    sleep 60 # wait long enough to ensure the frozen emacs is started
    pids=`/bin/ps -axo pid,command | grep [E]macs | awk '{ print $1 }' | tr
'\n' ' '`
    if [ "no$pids" != "no" ]; then
        kill -KILL $pids
    fi
    /usr/bin/emacs
Saved this as killAndRestartTheGodOfEditors.app and added it to my Login
Items.
(Note: having `open -a /Applications/Emacs.app` directly in the script
rather than via my `/usr/bin/emacs` to launch Emacs fails for some reason
that I have not yet investigated!)

So now the boot-time emacs (which lately always hangs) is killed off and a
new emacs is started. It's not ideal, but at least I've got a working emacs
when my iMac finishes booting. And I don't mind the 1 minute wait to ensure
it doesn't try to kill a not yet running emacs: I usually power on the Mac
and then only I brew some coffee, go get the newspaper etc etc while it's
booting anyhow.

​Hope this helps,

Guido​


I have been too lazy to investigate or even post here - so thank you for
> doing so.
>
> Ciao
> Mark
>
>
>


  reply	other threads:[~2014-11-03  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26 10:25 Emacs fails to create frame at boot of OSX Guido Van Hoecke
2014-10-26 11:56 ` Mark Simpson
2014-11-03  9:44   ` Guido Van Hoecke [this message]
2015-08-22 13:03     ` Guido Van Hoecke

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=CAEySM9Fm+MzUMigwvAiyZST-BYxpOA4ar8qTvbPfPupOqtVf+w@mail.gmail.com \
    --to=guivho@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=verdammelt@gmail.com \
    /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.
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).