unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Activate multiple profiles inside emacs
@ 2022-03-08 15:02 Reza Housseini
  2022-03-08 16:31 ` Justin Veilleux
  2022-03-16 15:00 ` Maxim Cournoyer
  0 siblings, 2 replies; 3+ messages in thread
From: Reza Housseini @ 2022-03-08 15:02 UTC (permalink / raw)
  To: help-guix

Hi Guix

Say I have several projects each with their specific profile containing 
the needed dependencies and a profile for all my Emacs specific stuff.

Now I want to work on a projects inside Emacs and make therefore a union 
of the project specific profile and my Emacs profile. So as for example 
pylint does not complain about missing modules inside my project source 
code.

As I understand I could source my needed profile files in a shell and 
then start Emacs from there, but this makes it quite cumbersome to 
switch projects as I have to restart Emacs every time.

Is there a possibility to achieve the same while Emacs keeps running?

How do you guixers handle this scenario? Or is there an obvious solution 
to my needs?


Thanks for any input!


Cheers,

Reza



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Activate multiple profiles inside emacs
  2022-03-08 15:02 Activate multiple profiles inside emacs Reza Housseini
@ 2022-03-08 16:31 ` Justin Veilleux
  2022-03-16 15:00 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Justin Veilleux @ 2022-03-08 16:31 UTC (permalink / raw)
  To: help-guix, Reza Housseini

I use direnv for this. You could set up your profiles, then, in the envrc, source all of them in order(I personally would keep sourcing the emacs specific profile separately though). There is a package (emacs-direnv) which integrates emacs and direnv which makes the sort of workflow you are describing seamless.

Cheers.

On March 8, 2022 10:02:32 a.m. EST, Reza Housseini <reza.housseini@gmail.com> wrote:
>Hi Guix
>
>Say I have several projects each with their specific profile containing 
>the needed dependencies and a profile for all my Emacs specific stuff.
>
>Now I want to work on a projects inside Emacs and make therefore a union 
>of the project specific profile and my Emacs profile. So as for example 
>pylint does not complain about missing modules inside my project source 
>code.
>
>As I understand I could source my needed profile files in a shell and 
>then start Emacs from there, but this makes it quite cumbersome to 
>switch projects as I have to restart Emacs every time.
>
>Is there a possibility to achieve the same while Emacs keeps running?
>
>How do you guixers handle this scenario? Or is there an obvious solution 
>to my needs?
>
>
>Thanks for any input!
>
>
>Cheers,
>
>Reza
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Activate multiple profiles inside emacs
  2022-03-08 15:02 Activate multiple profiles inside emacs Reza Housseini
  2022-03-08 16:31 ` Justin Veilleux
@ 2022-03-16 15:00 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2022-03-16 15:00 UTC (permalink / raw)
  To: Reza Housseini; +Cc: help-guix

Hi Reza,

Reza Housseini <reza.housseini@gmail.com> writes:

> Hi Guix
>
> Say I have several projects each with their specific profile
> containing the needed dependencies and a profile for all my Emacs
> specific stuff.
>
> Now I want to work on a projects inside Emacs and make therefore a
> union of the project specific profile and my Emacs profile. So as for
> example pylint does not complain about missing modules inside my
> project source code.
>
> As I understand I could source my needed profile files in a shell and
> then start Emacs from there, but this makes it quite cumbersome to 
> switch projects as I have to restart Emacs every time.
>
> Is there a possibility to achieve the same while Emacs keeps running?
>
> How do you guixers handle this scenario? Or is there an obvious
> solution to my needs?

Typically, I keep a manifest.scm per project, then create the
environment with 'guix shell', retrieve the profile link with 'echo
$GUIX_ENVIRONMENT' within that environment, which I then pass to the
'guix-set-emacs-environment' Emacs procedure, which is provided by the
'emacs-guix' package.

Clunky, but it works for me.

Hope that helps,

Maxim


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-16 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 15:02 Activate multiple profiles inside emacs Reza Housseini
2022-03-08 16:31 ` Justin Veilleux
2022-03-16 15:00 ` Maxim Cournoyer

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).