emacsWithPackages: don't tell sub-Emacs about pkgs

If I'm running an Emacs executable from emacsWithPackages as my main
programming environment, and I'm hacking on Emacs, or the Emacs
packaging in Nixpkgs, or whatever, I don't want the Emacs packages
from the wrapper to show up in the load path of that child Emacs.  It
results in differing behaviour depending on whether the child Emacs is
run from Emacs or from, for example, an external terminal emulator,
which is very surprising.

To avoid this, pass another environment variable containing the
wrapper site-lisp path, and use that value to remove the corresponding
entry in EMACSLOADPATH, so it won't be propagated to child Emacsen.
This commit is contained in:
Alyssa Ross
2020-12-10 22:52:31 +00:00
parent 0127013b0f
commit 23d4bfb666
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -22,5 +22,6 @@ else
fi
export EMACSLOADPATH="${newLoadPath[*]}"
export emacsWithPackages_siteLisp=@wrapperSiteLisp@
exec @prog@ "$@"