From 23d4bfb6661ca57a9e331a2cf4184232d38ac38b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 7 Dec 2020 18:53:54 +0000 Subject: 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. --- pkgs/build-support/emacs/wrapper.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/build-support/emacs') diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh index 85657ac5619..96c9a8a60ea 100644 --- a/pkgs/build-support/emacs/wrapper.sh +++ b/pkgs/build-support/emacs/wrapper.sh @@ -22,5 +22,6 @@ else fi export EMACSLOADPATH="${newLoadPath[*]}" +export emacsWithPackages_siteLisp=@wrapperSiteLisp@ exec @prog@ "$@" -- cgit 1.4.1