From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.devel Subject: Re: Managing environments (Python venv, guix environment, etc.) Date: Wed, 27 Jul 2016 20:02:15 -0400 Message-ID: <87popypr3s.fsf@earth.catern.com> 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> <87lh0qry9j.fsf@gmx.de> <87eg6hswd2.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469664168 2587 80.91.229.3 (28 Jul 2016 00:02:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 00:02:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 28 02:02:39 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 1bSYmc-00054E-G7 for ged-emacs-devel@m.gmane.org; Thu, 28 Jul 2016 02:02:38 +0200 Original-Received: from localhost ([::1]:50139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSYmb-0000Ep-EH for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2016 20:02:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSYmT-0000EZ-Jg for emacs-devel@gnu.org; Wed, 27 Jul 2016 20:02:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSYmP-0007Fr-Cf for emacs-devel@gnu.org; Wed, 27 Jul 2016 20:02:28 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSYmP-0007Fb-5N for emacs-devel@gnu.org; Wed, 27 Jul 2016 20:02:25 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bSYmM-0004zf-MM for emacs-devel@gnu.org; Thu, 28 Jul 2016 02:02:22 +0200 Original-Received: from cpe-66-108-244-72.nyc.res.rr.com ([66.108.244.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2016 02:02:22 +0200 Original-Received: from sbaugh by cpe-66-108-244-72.nyc.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2016 02:02:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpe-66-108-244-72.nyc.res.rr.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:dd2LmV0owtAIEDUewa6Fh8p/Ck4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:206198 Archived-At: Michael Albinus writes: > And for start-file-process. And for shell-command. And for ... > > Doesn't sound applicable to me. Do you believe all callers will adapt in > finite time? It took years to let them move to process-file and friends, > and there are still bug reports about packages which didn't care. > > And now we would ask to change again, with all the pain of backward > compatibility. > > Best regards, Michael. I do think it's best to use the same mechanism (process-file) that is used to support remote access. Really, remote access is very similar to entering a different local environment. They're different contexts in which to execute commands. And consider: Much of the work in determining what is sensible to execute in the default context, and what is sensible to execute in the remote/custom context, has already been done for remote access. ispell runs the spell-checker in the default context; M-x compile runs the compile in the custom context; and so on. I think this solves the issues Eli brought up in another mail. Furthermore, I think it would be beneficial for the experience of using a different local environment to be very similar to the experience of using a remote server, given their similarity. Perhaps instead of inserting regular filenames into file-name-handler-alist, environment.el should use filenames with a custom prefix (like "/?" or something) and add a new handler for filenames with that prefix. The prefix can be followed by the name of the environment, then some separator character, then a real local filename. (Much like TRAMP. Unlike TRAMP, file access will still be done directly on the local filesystem.) Pros: - Resolves the issue with canonical file names - Allows a file to be accessed from multiple environments freely at the same time - Powerful and full-featured way to implement this - just as powerful as TRAMP, which is certainly powerful enough. - Maybe the easiest way to get this to actually work, since it reuses all the work done on getting things to use process-file Cons: - The user interface might be tricky and cumbersome and unnatural. On the other hand, TRAMP is hugely useful, even though it uses exactly this interface. I'm thinking that this is the best way. Thoughts?