From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: path, cwd in NS port Date: Thu, 28 May 2020 21:46:48 +0100 Message-ID: <20200528204648.GB919@breton.holly.idiocy.org> References: <20200528110037.53f0b487@jabberwock.cb.piermont.com> <831rn4rqf0.fsf@gnu.org> <20200528123137.00369308@jabberwock.cb.piermont.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="123233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 28 22:49:39 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jePT8-000Vye-Sj for ged-emacs-devel@m.gmane-mx.org; Thu, 28 May 2020 22:49:38 +0200 Original-Received: from localhost ([::1]:39358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jePT7-00061r-P9 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 May 2020 16:49:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jePSQ-0005Z8-D0 for emacs-devel@gnu.org; Thu, 28 May 2020 16:48:54 -0400 Original-Received: from ip6-2001-08b0-03f8-8129-492d-e87b-16d1-ecad.holly.idiocy.org ([2001:8b0:3f8:8129:492d:e87b:16d1:ecad]:49637 helo=breton.holly.idiocy.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jePSP-0003vy-CS; Thu, 28 May 2020 16:48:54 -0400 Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 34AA42023305D6; Thu, 28 May 2020 21:46:48 +0100 (BST) Mail-Followup-To: Alan Third , "Perry E. Metzger" , Eli Zaretskii , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <20200528123137.00369308@jabberwock.cb.piermont.com> Received-SPF: none client-ip=2001:8b0:3f8:8129:492d:e87b:16d1:ecad; envelope-from=alan@breton.holly.idiocy.org; helo=breton.holly.idiocy.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/28 16:46:49 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RDNS_DYNAMIC=0.982, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251579 Archived-At: On Thu, May 28, 2020 at 12:31:37PM -0400, Perry E. Metzger wrote: > On Thu, 28 May 2020 19:10:43 +0300 Eli Zaretskii wrote: > > Is this the same problem as discussed in bug#40924? (I don't use > > macOS, so apologies if I;m confused about this issue.) > > It's certainly a version of the same issue; something happened such > that the default CWD is no longer set to ~/ recently. That should be > fixed independently if anyone knows what changed. (I've noticed this > issue myself and it is quite irritating.) Does it definitely work in Emacs 26? I've had this ((string-equal system-type "darwin") (setq default-directory (concat (getenv "HOME") "/")) in my init.el since 2015. > One option that occurred to me was that it would be pretty easy to > invoke an "echo $PATH" shell command in my .emacs and parse it into > the exec-path, though I'd prefer only to do this if Emacs was invoked > a certain way (from the dock, spotlight, etc.) where the PATH is > known not to be set. A cheap and nasty method would be to look for environment variables normally set by the shell. Why not use exec-path-from-shell? -- Alan Third