emacs-direnv
emacs-direnv copied to clipboard
add support for TRAMP
Having support for TRAMP
would allow the use of emacs-direnv
on remote machines.
i don't really see how that could work. this package patches the local env inside emacs, and inherently acts locally
I think it need to patch the remote tramp environment instead of the local when in a tramp directory. Some example of changes are call-process
should be replaced by process-file
and process-environment
by tramp-remote-process-environment
.
Some days ago I ran into a package that added tramp support with a couple of line patch, unfortunately I can't manage to find it today. The only lead I have ATM is that page page of the TRAMP manual on how to integrate it with other packages.
EDIT: In emacs 27.1 executable-find
can take an optional remote argument, see here.
I have just integrated Direnv with Tramp in my own configuration by prefixing commands executed in Tramp with direnv exec <default-directory>
. I advised tramp-sh-handle-start-file-process
instead of dealing with tramp-remote-process-environment
, which goes quite contrary to how emacs-direnv
operates and is less efficient, but it works.
@wbolster any update? There seems to be a pull request.
Any update? Two packages I know both don't support tramp, envrc and emacs-direnv.