Comment about Tramp
astoff opened this issue · 0 comments
astoff commented
I just found out the following fun fact about Tramp, which you might want to know about, assuming you don't already.
When you start a process on a remote path, Tramp uses a heuristic to decide which environment variables to export to the remote. The heuristic is to export all entries of process-environment
which are not in the default toplevel value of process-environment
(because presumably those have been let bound).
Now you can see that if you set the process environment buffer-locally, lots of variables might end up being exported which you wouldn't want to (including the PATH).
Paradoxically, patching things with inheritenv
solves this issue by disinheriting some variables!