From: Kyle Meyer <kyle@kyleam.com>
To: guix-devel <guix-devel@gnu.org>
Subject: Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT?
Date: Sat, 22 Jul 2017 21:39:49 -0400 [thread overview]
Message-ID: <87zibwlymy.fsf@kyleam.com> (raw)
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
next reply other threads:[~2017-07-23 1:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 1:39 Kyle Meyer [this message]
2017-07-23 21:12 ` Should guix-emacs-autoload-packages use GUIX_ENVIRONMENT? Alex Kost
2017-07-23 22:29 ` Kyle Meyer
2017-07-24 21:19 ` Alex Kost
2017-07-24 22:25 ` Kyle Meyer
2017-07-25 21:33 ` Marius Bakke
2017-07-26 1:40 ` Kyle Meyer
2017-07-26 20:02 ` Alex Kost
2017-07-27 11:38 ` Ricardo Wurmus
2017-07-26 20:06 ` Alex Kost
2017-07-27 5:04 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zibwlymy.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).