[Top][All Lists]

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

Re: Emacs in multiple profiles

From: myglc2
Subject: Re: Emacs in multiple profiles
Date: Wed, 18 Apr 2018 15:49:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

On 03/27/2018 at 18:38 Alex Kost writes:

> Konrad Hinsen (2018-03-26 10:24 +0200) wrote:
>> Alex Kost <address@hidden> 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 <address@hidden> 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 \
(let ((guix-env (getenv \"GUIX_ENVIRONMENT\")))
  (when (and guix-env
             (require 'guix-emacs nil t))
    (guix-emacs-autoload-packages guix-env)))" \
guix package --roll-back

2) guix environment approach ...

guix environment --ad-hoc emacs magit -- \
emacs --no-init-file --no-site-file \
(let ((guix-env (getenv \"GUIX_ENVIRONMENT\")))
  (when (and guix-env
             (require 'guix-emacs nil t))
    (guix-emacs-autoload-packages guix-env)))" \

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

Attachment: emacs.scm
Description: Binary data

Attachment: init0.el
Description: application/emacs-lisp

reply via email to

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