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: path, cwd in NS port Date: Thu, 28 May 2020 11:00:37 -0400 Message-ID: <20200528110037.53f0b487@jabberwock.cb.piermont.com> 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="18283"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 28 17:03:19 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 1jeK3z-0004ep-17 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 May 2020 17:03:19 +0200 Original-Received: from localhost ([::1]:37442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeK3y-0004a1-2m for ged-emacs-devel@m.gmane-mx.org; Thu, 28 May 2020 11:03:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeK1P-00038V-Se for emacs-devel@gnu.org; Thu, 28 May 2020 11:00:39 -0400 Original-Received: from hacklheber.piermont.com ([166.84.7.14]:46288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeK1O-0003JH-TC for emacs-devel@gnu.org; Thu, 28 May 2020 11:00:39 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id 099863B for ; Thu, 28 May 2020 11:00:38 -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 C2AE83C2002 for ; Thu, 28 May 2020 11:00:37 -0400 (EDT) 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/28 11:00:38 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:251550 Archived-At: Howdy! For years, it has irritated me a bit that when Emacs is invoked by double-clicking the icon in the NS port, that the user's path is basically empty and the selected cwd is sometimes "/". I would like to make it possible for a user to at least correct this situation in their .emacs by knowing when Emacs has been invoked by launching the .app versus when it has been invoked from the command line (and has the proper PATH set etc.) Does anyone have ideas for ways that the user could figure out which it is correctly inside their init file? (It's okay if the method doesn't currently exist and it would require hacking to Emacs to add such a feature; I'll happily do that.) Note that in a theoretical sense such an issue probably exists on other platforms (or might in the future) so something clean would be good. Perry -- Perry E. Metzger perry@piermont.com