gnu: emacs: Check GUIX_ENVIRONMENT when autoloading packages.

Check the environment profile so that we autoload packages that are given as
arguments to "guix environment" but are not in the system or user profile.
Note that the union of Emacs packages in the system, user, and environment
profiles will be autoloaded even when --pure was passed to "guix environment",
because it's not clear how to detect that --pure was given.

* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages):
Add Emacs packages from GUIX_ENVIRONMENT profile.

Signed-off-by: Alex Kost <alezost@gmail.com>
master
Kyle Meyer 2017-07-27 01:01:26 -04:00 committed by Alex Kost
parent d0a5205292
commit 24b115dff5
No known key found for this signature in database
GPG Key ID: 82460C082A0EE98F
1 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,7 @@
;;; guix-emacs.el --- Emacs packages installed with Guix
;; Copyright © 2014, 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
;; This file is part of GNU Guix.
@ -87,9 +88,11 @@ 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
(append (list "/run/current-system/profile"
guix-user-profile)
(and env (list env))))))
(dolist (profile profiles)
(let ((dirs (guix-emacs-directories profile)))
(when dirs