From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: merlyn@stonehenge.com (Randal L. Schwartz) Newsgroups: gmane.emacs.devel Subject: Re: OSX breakage for Emacs.app shortly after 10/17 Date: Tue, 29 Oct 2013 15:39:17 -0700 Organization: Stonehenge Consulting Services; Portland, Oregon, USA Message-ID: <86vc0fwvl6.fsf@red.stonehenge.com> References: <86habzybsd.fsf@red.stonehenge.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383086381 28271 80.91.229.3 (29 Oct 2013 22:39:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 22:39:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 29 23:39:46 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VbHww-00032s-9M for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 23:39:46 +0100 Original-Received: from localhost ([::1]:49679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbHwv-0007yc-Ue for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 18:39:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbHwo-0007yX-G0 for emacs-devel@gnu.org; Tue, 29 Oct 2013 18:39:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbHwi-00061u-Oh for emacs-devel@gnu.org; Tue, 29 Oct 2013 18:39:38 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbHwi-00061o-Ht for emacs-devel@gnu.org; Tue, 29 Oct 2013 18:39:32 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VbHwf-0002yQ-41 for emacs-devel@gnu.org; Tue, 29 Oct 2013 23:39:29 +0100 Original-Received: from red.stonehenge.com ([208.79.95.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Oct 2013 23:39:29 +0100 Original-Received: from merlyn by red.stonehenge.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Oct 2013 23:39:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: red.stonehenge.com x-mayan-date: Long count = 13.0.0.15.12; tzolkin = 4 Eb; haab = 10 Zac User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) Cancel-Lock: sha1:uYF8bJGBcQ4RZsoq7SEoXcNGzI8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164663 Archived-At: >>>>> "Randal" == Randal L Schwartz writes: Randal> The 10/17 build on OSX works just fine for me. Randal> Shortly after that, (and still in the current head), evaluating Randal> "open -a emacs ." (to open the current directory in a native window in a Randal> dired) results in: Randal> command-line-1: Unknown option `-psn_0_1728934' Randal> and the dired window fails to open. I'm not sure if the number changes Randal> depending on the directory. Randal> Anyone remember making changes that might affect command-line-1 like Randal> that? Randal> I tried some logs near lisp/startup.el but nothing stood out. Aha! There *is* a recent change in src/emacs.c applying to the NS_IMPL_COCOA port. Perhaps this is the culprit: if (!noninteractive) { #ifdef NS_IMPL_COCOA - if (skip_args < argc) + /* Started from GUI? */ + /* FIXME: Do the right thing if getenv returns NULL, or if + chdir fails. */ + if (! inhibit_window_system && ! isatty (0)) + chdir (getenv ("HOME")); + else if (skip_args < argc) { - /* FIXME: Do the right thing if getenv returns NULL, or if - chdir fails. */ if (!strncmp (argv[skip_args], "-psn", 4)) { skip_args += 1; -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix consulting, Technical writing, Comedy, etc. etc. Still trying to think of something clever for the fourth line of this .sig