emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing environments (Python venv, guix environment, etc.)


From: sbaugh
Subject: Re: Managing environments (Python venv, guix environment, etc.)
Date: Wed, 27 Jul 2016 20:02:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Michael Albinus <address@hidden> 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]