guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: gnu: emacs: Check GUIX_ENVIRONMENT when autoloading packages.


From: Alex Kost
Subject: 04/04: gnu: emacs: Check GUIX_ENVIRONMENT when autoloading packages.
Date: Sat, 29 Jul 2017 16:23:42 -0400 (EDT)

alezost pushed a commit to branch master
in repository guix.

commit 24b115dff570948f88bfd67179055097bcf875ff
Author: Kyle Meyer <address@hidden>
Date:   Thu Jul 27 01:01:26 2017 -0400

    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 <address@hidden>
---
 gnu/packages/aux-files/emacs/guix-emacs.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el 
b/gnu/packages/aux-files/emacs/guix-emacs.el
index 2bbd639..9a49e88 100644
--- a/gnu/packages/aux-files/emacs/guix-emacs.el
+++ b/gnu/packages/aux-files/emacs/guix-emacs.el
@@ -1,6 +1,7 @@
 ;;; guix-emacs.el --- Emacs packages installed with Guix
 
 ;; Copyright © 2014, 2015, 2016, 2017 Alex Kost <address@hidden>
+;; Copyright © 2017 Kyle Meyer <address@hidden>
 
 ;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]