Kyle Meyer (2017-07-22 21:39 -0400) wrote: > Hello, > > I noticed that Emacs packages from the user's profile leak into guix > environment calls.
As for me, this is a natural behaviour. If you want to be safe from any external packages, site settings, etc., run "emacs -Q". > For example, when I run > > $ guix environment --pure --ad-hoc emacs -- emacs -q > > load-path contains the Emacs packages from my main profile. Right, but "-q" is not enough here. If you don't want these packages to be autoloaded, you need to run emacs with "-Q" or "--no-site-file". > I expected it to use GUIX_ENVIRONMENT instead (something like the patch > below, I think). I wouldn't expect "instead", I would expect "along with". > Does guix-emacs-autoload-packages ignore GUIX_ENVIRONMENT by design? No, I think it's just that no one thought about this possibility before (I mean a possibility to use emacs packages from "guix environment"). > I suppose one downside of honoring GUIX_ENVIRONMENT is that, if the --pure > flag isn't passed and the package arguments aren't Emacs-related, a user > may be surprised that their Emacs packages are no longer available in > newly created Emacs instances. I'm not sure. I think if you run "emacs -q", you really want "emacs -Q". Otherwise, if you start emacs normally, you probably don't want to ignore emacs packages from your guix profile. However, I agree that GUIX_ENVIRONMENT should be honored, but as I wrote *not instead* but *along with* the default profiles. So if you start emacs like this: guix environment --ad-hoc emacs emacs-wget -- emacs it should contain emacs-wget in its load-path. WDYT? -- Alex