From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT? Date: Mon, 24 Jul 2017 00:12:28 +0300 Message-ID: <87eft6j1s3.fsf@gmail.com> References: <87zibwlymy.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZOB5-0005FN-Q4 for guix-devel@gnu.org; Sun, 23 Jul 2017 17:12:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZOB0-0002NF-JR for guix-devel@gnu.org; Sun, 23 Jul 2017 17:12:37 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:36844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZOB0-0002N8-Ac for guix-devel@gnu.org; Sun, 23 Jul 2017 17:12:34 -0400 Received: by mail-lf0-x229.google.com with SMTP id d78so37933156lfg.3 for ; Sun, 23 Jul 2017 14:12:32 -0700 (PDT) In-Reply-To: <87zibwlymy.fsf@kyleam.com> (Kyle Meyer's message of "Sat, 22 Jul 2017 21:39:49 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Kyle Meyer Cc: guix-devel 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