From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: path, cwd in NS port Date: Fri, 29 May 2020 21:03:42 -0400 Message-ID: <20200529210342.6014fe80@jabberwock.cb.piermont.com> References: <20200528110037.53f0b487@jabberwock.cb.piermont.com> <831rn4rqf0.fsf@gnu.org> <20200528123137.00369308@jabberwock.cb.piermont.com> <20200528204648.GB919@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56690"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 30 03:04:33 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 1jepvM-000Ee7-8K for ged-emacs-devel@m.gmane-mx.org; Sat, 30 May 2020 03:04:32 +0200 Original-Received: from localhost ([::1]:56494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jepvL-0004yK-8v for ged-emacs-devel@m.gmane-mx.org; Fri, 29 May 2020 21:04:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jepuk-0004Wm-Dd for emacs-devel@gnu.org; Fri, 29 May 2020 21:03:54 -0400 Original-Received: from hacklheber.piermont.com ([166.84.7.14]:53156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jepui-0002nQ-1q; Fri, 29 May 2020 21:03:54 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id 81AE127A; Fri, 29 May 2020 21:03:42 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id 5DDD43C2001; Fri, 29 May 2020 21:03:42 -0400 (EDT) In-Reply-To: <20200528204648.GB919@breton.holly.idiocy.org> Received-SPF: pass client-ip=166.84.7.14; envelope-from=perry@piermont.com; helo=hacklheber.piermont.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/29 21:03:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, 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:251634 Archived-At: On Thu, 28 May 2020 21:46:48 +0100 Alan Third wrote: > Does it definitely work in Emacs 26? I've had this > > ((string-equal system-type "darwin") > (setq default-directory (concat (getenv "HOME") "/")) Yes; I've confirmed it works in Emacs 26 but not 27. > > 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. That's possible, though I think the cleanest solution would be for Emacs to set something itself using Info.plist > Why not use exec-path-from-shell? exec-path-from-shell seems to be a third party package that I did not previously know existed. Perry -- Perry E. Metzger perry@piermont.com