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: Tue, 26 Jul 2016 05:08:31 +0300 Message-ID: <6626aaa2-caa5-48cb-2898-931c4eae4e5c@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> <83vazvt8q3.fsf@gnu.org> <83oa5ltzy0.fsf@gnu.org> 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 1469498968 1256 80.91.229.3 (26 Jul 2016 02:09:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jul 2016 02:09:28 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 26 04:09: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 1bRroC-00059Y-2p for ged-emacs-devel@m.gmane.org; Tue, 26 Jul 2016 04:09:24 +0200 Original-Received: from localhost ([::1]:36826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRroB-00014J-FN for ged-emacs-devel@m.gmane.org; Mon, 25 Jul 2016 22:09:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRrnT-00013p-P8 for emacs-devel@gnu.org; Mon, 25 Jul 2016 22:08:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRrnP-0004Wt-Ig for emacs-devel@gnu.org; Mon, 25 Jul 2016 22:08:38 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRrnP-0004Wa-Ba; Mon, 25 Jul 2016 22:08:35 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id o80so180664723wme.1; Mon, 25 Jul 2016 19:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=L9zc0p1wLt5Z7N2FK++Od/ySnH30iCATer/MXcftAN0=; b=G5IXkAG1DnJFtr3e4HmZAf7LCzm49zw9mwAT7XIuEEnAa9AYiw6RXgklxBf20AeLGn tUFPYAXxCEwYDkw6+qtL46KVIaxiL75awIn3/RFBkAVFKqBYzm4e5ZPE04VeecJD6z5H MqV2EKH2eUvXQlAsjucXLl5lWFu38a2Ultj8HfspAC8S37YMH5IaBZjW0Ovz7cqLeexe 1keJOacAHyju4UwUJf5/RcIh00jHO6TOhNf815niqEe40bwbo2wxwl7vaKGsOtcAswC7 sZm+czKXl63bhrNoASh9RNNdELgYpoYPF9wYcEBOcOFIwtGoqCJZiIzYnbVJrywE+QOv yBBQ== 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:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=L9zc0p1wLt5Z7N2FK++Od/ySnH30iCATer/MXcftAN0=; b=kYq9ldiGFHUiODT8tQpZXqZuAhD2Wf1DZw1m9Kwfl9kOBofsn8aauCLrRY5xav7+Zt HRx7u3YpIDFW9Pi2JGty/tZEkSojWbAllH7sboQP7YPZIf6NaRliqAu2Cx8UU8kFK3N8 lB74IULLbEIrV4XnDaSxUGlwviqaQFQjQQGfPCW15SKzjz4U9BmQsEDO23/YDlwvlYmf B0V2ge3CbrqfoOFCcq4bJxXg2QCg18EhrVoKC6hH6Egq9l4gLH9X6I3z8aLxhRMHaEef pPpEMaTHsJCztkYpZhKFviat++Y3oeKTV95XllRbzEAqQsmdD9gdquK2jWiHKco6qXLU J6vQ== X-Gm-Message-State: AEkoouu2fBgBit463+9otu4xSGyG+epQZqER2KtvfSbyiEhIkryrWn8n9rPUXXOWnvKl1A== X-Received: by 10.194.5.230 with SMTP id v6mr19953258wjv.92.1469498914450; Mon, 25 Jul 2016 19:08:34 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.173.135]) by smtp.googlemail.com with ESMTPSA id o7sm18526225wjf.39.2016.07.25.19.08.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 19:08:33 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 In-Reply-To: <83oa5ltzy0.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::233 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:206134 Archived-At: On 07/25/2016 08:00 PM, Eli Zaretskii wrote: >> Couldn't that be fixed? > > We try, but it isn't always easy. Here's one example, from > file-truename: > > (let ((handler (find-file-name-handler filename 'file-truename))) > ;; For file name that has a special handler, call handler. > ;; This is so that ange-ftp can save time by doing a no-op. > (if handler > (setq filename (funcall handler 'file-truename filename) > done t) > (let ((dir (or (file-name-directory filename) default-directory)) > target dirfile) > ;; Get the truename of the directory. > (setq dirfile (directory-file-name dir)) > ;; If these are equal, we have the (or a) root directory. > (or (string= dir dirfile) > (and (memq system-type '(windows-nt ms-dos cygwin nacl)) > (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) > > As you see, we only apply the MS-Windows specific treatment to files > which don't have a handler, on the assumption that those which do are > not subject to rules that govern local files on MS-Windows. Maybe default handler implementation could bind the handlers alist to nil and call file-truename again. >> Consider: if we just add a new defgeneric (or two) to project.el, any >> specialized environment implementation would either have to provide its >> own full project implementation (i.e. it'll be unable to use >> vc-project), or it'll have to define specialized implementations of >> these methods just for certain types of projects it knows about. > > Why can't the default implementation behave as if "environments" > didn't exist? Then those projects will miss out on Guix, and similar, integrations. > Then the behavior will be exactly as it is now, no? It would. That doesn't sound optimal to me. My point is, whether a project uses Guix, or a similar tool, should be in vast majority of cases orthogonal to the type of the project (language used, frameworks, configuration file format, etc). So far I'm inclined to believe that there should be about as many project implementations as there are project file formats (e.g. Maven, Ant, Autotools, Gradle configs, specialized formats used by other editors, etc). There's no reason to multiply that by the number of environment types we want to support.