[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?
From: |
Kyle Meyer |
Subject: |
Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT? |
Date: |
Sat, 22 Jul 2017 21:39:49 -0400 |
Hello,
I noticed that Emacs packages from the user's profile leak into guix
environment calls.
For example, when I run
$ guix environment --pure --ad-hoc emacs -- emacs -q
load-path contains the Emacs packages from my main profile.
I expected it to use GUIX_ENVIRONMENT instead (something like the patch
below, I think).
Does guix-emacs-autoload-packages ignore GUIX_ENVIRONMENT by design? 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.
Thanks.
-- >8 --
diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el
b/gnu/packages/aux-files/emacs/guix-emacs.el
index 2bbd639ff..2d0d50e11 100644
--- a/gnu/packages/aux-files/emacs/guix-emacs.el
+++ b/gnu/packages/aux-files/emacs/guix-emacs.el
@@ -87,9 +87,11 @@ (defun guix-emacs-autoload-packages (&rest profiles)
(interactive (list (if (fboundp 'guix-read-package-profile)
(funcall 'guix-read-package-profile)
guix-user-profile)))
- (let ((profiles (or profiles
- (list "/run/current-system/profile"
- guix-user-profile))))
+ (let* ((env (getenv "GUIX_ENVIRONMENT"))
+ (profiles (or profiles
+ (and env (list env))
+ (list "/run/current-system/profile"
+ guix-user-profile))))
(dolist (profile profiles)
(let ((dirs (guix-emacs-directories profile)))
(when dirs
--
2.13.3
- Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?,
Kyle Meyer <=
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Alex Kost, 2017/07/23
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Kyle Meyer, 2017/07/23
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Alex Kost, 2017/07/24
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Kyle Meyer, 2017/07/24
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Marius Bakke, 2017/07/25
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Kyle Meyer, 2017/07/25
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Alex Kost, 2017/07/26
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Ricardo Wurmus, 2017/07/27
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Alex Kost, 2017/07/26
- Re: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?, Kyle Meyer, 2017/07/27