On 03/27/2018 at 18:38 Alex Kost writes: > Konrad Hinsen (2018-03-26 10:24 +0200) wrote: > >> Alex Kost <[email protected]> writes: >> >>> But what your "current profile" is? How can emacs know about it? It >>> "knows" only about the default (system and user) profiles. So if you >> >> I'd say Emacs knows nothing at all about profiles. It's Guix that >> manages profiles for everyone else, be it bash, Python, or Emacs. To get >> the behavior that I expected, Guix would have to define and manage an >> environment variable, let's call it EMACS_PATH, which would be used in >> site-start.el. >> >> What I cannot judge is how much effort it would be to implement such a >> feature, and if it could have undesirable side-effects. > > As for me, I think the current behaviour (looking for packages only in > the user and the system profiles) is the right one. If you want to > auto-load emacs packages from some non-standard profiles, you can easily > do this on your own (as I showed in the previous message). > > Anyway, if you think that some feature is missing, I would recommend to > send a message to <[email protected]> about it. Perhaps other people > will agree with your point.
Hi Konrad & Alex,
I am revamping my emacs config approach and I came across your
discussion. Following Alex's suggestions I found 2 approaches that seem
to do what Konrad wanted ...
1) guix profile approach ...
guix package -m emacs.scm
emacs --no-init-file \
--eval="\
(let ((guix-env (getenv \"GUIX_ENVIRONMENT\")))
(when (and guix-env
(require 'guix-emacs nil t))
(guix-emacs-autoload-packages guix-env)))" \
--load=".emacs.d/init0.el"
guix package --roll-back
2) guix environment approach ...
guix environment --ad-hoc emacs magit -- \
emacs --no-init-file --no-site-file \
--eval="\
(let ((guix-env (getenv \"GUIX_ENVIRONMENT\")))
(when (and guix-env
(require 'guix-emacs nil t))
(guix-emacs-autoload-packages guix-env)))" \
--load=".emacs.d/init0.el"
For my purposes 2) is better -- It starts more quickly and doesn't
"infect" other login sessions. It also allows multiple, different,
isolated Emacs environments to run simultaneously. Sweet ;-)
- George
emacs.scm
Description: Binary data
init0.el
Description: application/emacs-lisp
