From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guido Van Hoecke Newsgroups: gmane.emacs.help Subject: Re: Emacs fails to create frame at boot of OSX Date: Mon, 3 Nov 2014 10:44:53 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1415007968 23375 80.91.229.3 (3 Nov 2014 09:46:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2014 09:46:08 +0000 (UTC) Cc: help-gnu-emacs To: Mark Simpson Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 03 10:46:02 2014 Return-path: Envelope-to: geh-help-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 1XlED4-0005B2-34 for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 10:46:02 +0100 Original-Received: from localhost ([::1]:33178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlED3-0007Kk-Kp for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 04:46:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlECU-0006vI-US for help-gnu-emacs@gnu.org; Mon, 03 Nov 2014 04:45:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlECT-0000GK-Qx for help-gnu-emacs@gnu.org; Mon, 03 Nov 2014 04:45:26 -0500 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:46772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlECT-0000Fm-GE for help-gnu-emacs@gnu.org; Mon, 03 Nov 2014 04:45:25 -0500 Original-Received: by mail-wi0-f182.google.com with SMTP id d1so5838920wiv.3 for ; Mon, 03 Nov 2014 01:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=8KKeYG1er1/vVQxaV2dJvXw6AoPFC5p3uIwJw19epts=; b=AY20+cv5sZVC5tD7RrviOFMxUFX+PHU5g7vySkQ5pmq76b2aT04/LxL7Q8wnObLX+v hYz1df0luBWRrGDuUKwSgkBJjEb77uXx3QrkJxUXaTS+hY5ZF7Poq+dyU2XEec8t1ath om8HcKZp2ufG4Y8zPu6N1sXZlsUDt3XAxDnCQZ2QkVkkvAZFEbIx4plvV58gWDq+1svZ cTx1oTFKzZd3e52biNY137vhd78UUflHQcrQxecLNjr6WWbQ8P7/x/+CPwuE1XCYntIr ftqb2UL7sihqK/laCPcdhJGbaHkLApRdis0onSlc6H6n1xs+JBpbJ1wdZxSuq2SvM1Ed FlqQ== X-Received: by 10.180.21.163 with SMTP id w3mr15081971wie.48.1415007924098; Mon, 03 Nov 2014 01:45:24 -0800 (PST) Original-Received: by 10.180.99.170 with HTTP; Mon, 3 Nov 2014 01:44:53 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100695 Archived-At: Hi Marc On 26 October 2014 12:56, Mark Simpson 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, > =E2=80=8B Fortunately this is utterly rare here, but then, I seldom close Emacs :) =E2=80=8B > without rebooting the machine. =E2=80=8BJust describing my current workaround, maybe it can help people su= ffering 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=3D`/bin/ps -axo pid,command | grep [E]macs | awk '{ print $1 }' | = tr '\n' ' '` if [ "no$pids" !=3D "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. =E2=80=8BHope this helps, Guido=E2=80=8B I have been too lazy to investigate or even post here - so thank you for > doing so. > > Ciao > Mark > > >