From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: slb zetrov Newsgroups: gmane.emacs.devel Subject: (No subject) Date: Fri, 22 May 2020 06:45:34 -0400 Message-ID: <146051590141467@mail.yandex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47445"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Vasilij Schneidermann , "monnier@iro.umontreal.ca" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 22 12:46: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 1jc5Bx-000CCA-Ow for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 12:46:17 +0200 Original-Received: from localhost ([::1]:33496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc5Bw-00044v-RE for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 06:46:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc5BT-0003fx-1F for emacs-devel@gnu.org; Fri, 22 May 2020 06:45:47 -0400 Original-Received: from forward101j.mail.yandex.net ([2a02:6b8:0:801:2::101]:47732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc5BP-0001SP-BZ for emacs-devel@gnu.org; Fri, 22 May 2020 06:45:46 -0400 Original-Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward101j.mail.yandex.net (Yandex) with ESMTP id A214E1BE22B4; Fri, 22 May 2020 13:45:35 +0300 (MSK) Original-Received: from localhost (localhost [::1]) by mxback6j.mail.yandex.net (mxback/Yandex) with ESMTP id xxB8UohGBN-jYpGJEtM; Fri, 22 May 2020 13:45:35 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1590144335; bh=+qrJdSlmp1dfyQbW6K6tokTWTD75XjjbVm8VzPo23TY=; h=Date:Message-Id:Cc:Subject:To:From; b=B8RFPSUdsfN2r3A1DO57aJ4G+Ml0YZ8pnf7Ns/Tt9pE9Z/o/wSzpGWV0a9kpzcrug H7LY55d0nE7e4knJSyDH/I9SeA/ydAOy5I1r5zzp48RVdD1sEKwlhpl55gZ6Oly0RK opZV0+aDmBWg1RmGBSIxbzjCgLfNoFhKmgIoou1Q= Authentication-Results: mxback6j.mail.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by iva4-35f072fa8e4e.qloud-c.yandex.net with HTTP; Fri, 22 May 2020 13:45:34 +0300 Envelope-From: zetrov-slb@yandex.com X-Mailer: Yamail [ http://yandex.ru ] 5.0 Received-SPF: pass client-ip=2a02:6b8:0:801:2::101; envelope-from=zetrov.slb@yandex.com; helo=forward101j.mail.yandex.net X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:251207 Archived-At: Hi, tl;dr: By actually trying to implement the idea, I just realized that the idea is flawed, and ‘exec-path-from-shell’ is necessary. --- Thanks for pointing out ‘exec-path-from-shell’ can work on other situations and ‘parsenv’ to sync two versions of paths. Problem is that users might have a lot of staffs inside ‘.bashrc’ ‘.bash_profile’ and ‘.zshrc’, as a result, an embedded script just cannot be simply imported to a shell session to figure the PATH. The only way to properly get the PATH is to let the shell print the PATH and read the results which is exactly what ‘exec-path-from-shell’ do. --- Technically, Emacs.app and command-line Emacs "lives" in two different worlds. Command-line Emacs lives in at a Unix environment. Emacs.app lives in macOS's ‘launchd‘ environment which is part of the desktop environment and it has a specific set of env variables. I guess the reason why some Linux desktop environments didn't provide right PATH is they override the env variables or use a different technique to launch applications. It might not be a bug but a feature. --- Thanks!