I currently use with-editor in eshell (using with-editor-export-editor) to set the environment variable EDITOR to something that allows me to use the current Emacs instance in most situations.
envrc--clear currently (and obviously) clears the local variable process-environment, with no option to preserve or restore e.g. my EDITOR configuration as generated by with-editor.
Would it be possible to preserve or restore some aspects of the process-environment in a user-configurable way?
I am aware that this could lead to weird situations if the chosen aspect is one that is also modified in the course of loading the .envrc file, as that would mean this modified value can no longer effectively be 'unloaded', but that seems a footgun I personally would be willing to deal with.
Please feel free to close if you think this edge case is out of scope for the project.
I currently use
with-editor
ineshell
(usingwith-editor-export-editor
) to set the environment variableEDITOR
to something that allows me to use the current Emacs instance in most situations.envrc--clear
currently (and obviously) clears the local variableprocess-environment
, with no option to preserve or restore e.g. myEDITOR
configuration as generated bywith-editor
.Would it be possible to preserve or restore some aspects of the process-environment in a user-configurable way? I am aware that this could lead to weird situations if the chosen aspect is one that is also modified in the course of loading the
.envrc
file, as that would mean this modified value can no longer effectively be 'unloaded', but that seems a footgun I personally would be willing to deal with.Please feel free to close if you think this edge case is out of scope for the project.