From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Managing environments (Python venv, guix environment, etc.) Date: Mon, 25 Jul 2016 05:37:56 +0300 Message-ID: <83wpkatpbv.fsf@gnu.org> References: <87y453sy0n.fsf@earth.catern.com> <87r3arripr.fsf@earth.catern.com> <874m7jygot.fsf@earth.catern.com> <83oa5ox21u.fsf@gnu.org> <123d2ae9-b523-5d5b-3bf8-c6e4462270b8@yandex.ru> <87a8h7wihs.fsf@earth.catern.com> <08e690b6-56a0-1182-2560-666e3bffb2ee@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469414312 9178 80.91.229.3 (25 Jul 2016 02:38:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jul 2016 02:38:32 +0000 (UTC) Cc: sbaugh@catern.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 25 04:38:27 2016 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 1bRVmj-0004S5-S2 for ged-emacs-devel@m.gmane.org; Mon, 25 Jul 2016 04:38:26 +0200 Original-Received: from localhost ([::1]:58305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRVmj-0004Gp-4n for ged-emacs-devel@m.gmane.org; Sun, 24 Jul 2016 22:38:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRVmZ-0004ES-FL for emacs-devel@gnu.org; Sun, 24 Jul 2016 22:38:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRVmU-0003zq-DR for emacs-devel@gnu.org; Sun, 24 Jul 2016 22:38:14 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRVmU-0003zm-A6; Sun, 24 Jul 2016 22:38:10 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4382 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bRVmS-0001UB-F7; Sun, 24 Jul 2016 22:38:08 -0400 In-reply-to: <08e690b6-56a0-1182-2560-666e3bffb2ee@yandex.ru> (message from Dmitry Gutov on Mon, 25 Jul 2016 02:04:42 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:206101 Archived-At: > From: Dmitry Gutov > Date: Mon, 25 Jul 2016 02:04:42 +0300 > > On 07/24/2016 11:25 AM, sbaugh@catern.com wrote: > > > Just a note: Ideally, Elisp code would also (somehow) go through the > > environment dispatcher, and see the exec-path and process-environment of > > the appropriate environment. There is surely Elisp code makes direct use > > of exec-path/process-environment and it should behave the same as > > external processes. > > Like Eli said, this seems unwise. But it hints at a logical problem: if > start-process and friends are simply documented to use exec-path and > process-environment, but use their modified values in some > circumstances, someone trying to debug this could have a big problem. One possible idea is to identify the programs that an environment would like to depend on it (like the compiler), define a variable for each one of them (compiler-program etc.), and then modify the corresponding commands to use that variable, if bound to non-nil, in preference to exec-path search.