[PATCH] gnu: emacs: Check GUIX_ENVIRONMENT when autoloading packages

  • Done
  • quality assurance status badge
Details
2 participants
  • Alex Kost
  • Kyle Meyer
Owner
unassigned
Submitted by
Kyle Meyer
Severity
normal

Debbugs page

Kyle Meyer wrote 8 years ago
(address . guix-patches@gnu.org)
20170727050126.27817-1-kyle@kyleam.com
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.
---

gnu/packages/aux-files/emacs/guix-emacs.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el
index 2bbd639ff..10bad0272 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
+ (append (list "/run/current-system/profile"
+ guix-user-profile)
+ (and env (list env))))))
(dolist (profile profiles)
(let ((dirs (guix-emacs-directories profile)))
(when dirs
--
2.13.3
Alex Kost wrote 8 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 27845-done@debbugs.gnu.org)
87lgn7m1ne.fsf@gmail.com
Kyle Meyer (2017-07-27 01:01 -0400) wrote:

Toggle quote (9 lines)
> 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.

Great! Applied as commit 24b115dff, thank you!

--
Alex
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27845@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27845
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help