From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Managing environments (Python venv, guix environment, etc.) Date: Mon, 25 Jul 2016 02:04:42 +0300 Message-ID: <08e690b6-56a0-1182-2560-666e3bffb2ee@yandex.ru> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1469401512 26036 80.91.229.3 (24 Jul 2016 23:05:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Jul 2016 23:05:12 +0000 (UTC) To: sbaugh@catern.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 25 01:05:04 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 1bRSSE-0007HM-Jo for ged-emacs-devel@m.gmane.org; Mon, 25 Jul 2016 01:05:02 +0200 Original-Received: from localhost ([::1]:57809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRSSA-0006Na-Kv for ged-emacs-devel@m.gmane.org; Sun, 24 Jul 2016 19:04:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRSS3-0006NT-Ut for emacs-devel@gnu.org; Sun, 24 Jul 2016 19:04:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRSRx-00033z-UQ for emacs-devel@gnu.org; Sun, 24 Jul 2016 19:04:50 -0400 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:36630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRSRx-00033c-NR for emacs-devel@gnu.org; Sun, 24 Jul 2016 19:04:45 -0400 Original-Received: by mail-wm0-x234.google.com with SMTP id q128so114915810wma.1 for ; Sun, 24 Jul 2016 16:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=EYnLRxB3sF1fY92z8+RDtbaCbJxg0zrNvOSN01xF4jE=; b=dyUxozQJadXs3VyhFnAO7A4nihYIsjUeqfrJkX0p9levON8kGzQ1kGu5Hmci8Wxpve Ce2Ug8b1PWjQipNwFyVHtyd8/oL3yOhraJSU2spW7Tf8yIVRPOrYsZESlsumGMrbBtki nVnqZvEamgqvKSVJe/+QexMD5kY2nao4AlC3K2/9MEI6hdzz9m2kTqX6gGrBnYd23Lzo Cnnmhf5cnEFVuJXU4zjANI3XrhmzRXMkS5boJIQWp//TpivLM3KHywrpThFzMu87kQgU Jah2P+aamheJJX5qdI0YGVjcX1GNya+eeBLQ3v1yHBTwKfrfYG0DrpyHDnpp0SEaqiZZ O92g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=EYnLRxB3sF1fY92z8+RDtbaCbJxg0zrNvOSN01xF4jE=; b=eXXr0nblQmFJmoDDU72Zj5Ygb0KBsSMNLEJKidHmQa3/U/Z7XB+DslEGCjzcAPWPDR RszI36Ho20yH2coqzYpqo9tWlyUgdT59h5pc0r4bTkKKM55VTQJfi3lHvruFjPpK5bld j+MH3JfCqJ9KW5wFZIKmR1U++eb1+U5XFXotpguf3ql+BSw0IPG/n3uTXVb49BD2CTPy SK9fxDYuZJ9/ke4Z+ssUhcLFhW0Kb8Uy8P0NkIy49lVWDhQC2VuYp7oXNemEXJxiKHs5 g17TJJs385OLJciJWfMPLHuATVzsjoOQk9P9YaMzXGGVSPbg2+DfK2N2DOjWJCqeyDWR bJRw== X-Gm-Message-State: AEkoouuWRWF3UGpLwIb2oIbEEB2Cd/5p8vt2wGk9SdgaaafWtmN58O27DqofVyWtVIV9iA== X-Received: by 10.194.87.194 with SMTP id ba2mr8291974wjb.100.1469401484831; Sun, 24 Jul 2016 16:04:44 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.173.135]) by smtp.googlemail.com with ESMTPSA id f10sm12676524wje.14.2016.07.24.16.04.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 16:04:43 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 In-Reply-To: <87a8h7wihs.fsf@earth.catern.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 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:206097 Archived-At: 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. Especially if the feature is implemented not using nadvice, but with file handlers. So I think we should either fall back to the idea of using buffer-local values and make it work somehow, or have environment.el provide its own versions of call-process, etc, that use the modified environments. The latter option will require modifying all appropriate callers, but seems like the cleanest approach to me. Alternatively, the docstrings of all process-interacting functions should be updated to mention environments.el, and at that point it would make sense to just integrate it into the core. Maybe the result would look similar to what you said, with all process primitives using the new functions (called e.g. environment-exec-path and environment-process-environment).