all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs-guix: variable is void: guix-current-profile
@ 2019-01-02 15:34 zimoun
  2019-01-03 11:26 ` Pierre Neidhardt
  2019-01-03 18:10 ` Alex Kost
  0 siblings, 2 replies; 8+ messages in thread
From: zimoun @ 2019-01-02 15:34 UTC (permalink / raw)
  To: help-guix

Dear,

Happy New Year !

Thank you this nice interface !!

I am have installed Guix on the top of Debian.
If I understand well, I installed the packages guile, guile-gcrypt and
Emacs, obviously. :-)
And emacs-guix comes from MELPA, Geiser too.
Then I am a bit confused.

M-x guix pops up.
However, press p leads to the message:
"guix-popup-format-profile: Symbol’s value as variable is void:
guix-current-profile"
But, C-h v guix-current-profile returns
"/var/guix/profiles/per-user/simon/guix-profile"

If I manually set `guix-current-profile' to
"/var/guix/profiles/per-user/simon/guix-profile" with M-x
guix-set-current-profile, then M-x guix p n works, I mean it returns
9206 available packages.
What I am missing?

Last, 'guix package -s gmsh' returns the package that I am looking for.
However, `M-x guix p n gmsh' does not.
I need to do 'guix package -i guix' to find gmsh with emacs-guix. Hum?
I guess I have a config twisted elsewhere? I mean the `Guix REPL'
buffer loads (emacs-guix) and there is a lot of warnings... but I do
not see one about gmsh from maths.scm.


Thank you for any tips.


All the best,
simon

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-02 15:34 Emacs-guix: variable is void: guix-current-profile zimoun
@ 2019-01-03 11:26 ` Pierre Neidhardt
  2019-01-03 12:22   ` zimoun
  2019-01-03 18:10 ` Alex Kost
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2019-01-03 11:26 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]


> If I understand well, I installed the packages guile, guile-gcrypt and
> Emacs, obviously. :-)
> And emacs-guix comes from MELPA, Geiser too.
> Then I am a bit confused.

I strongly recommend that you install emacs-guix from Guix only, and not from
MELPA.  The thing is that Emacs-Guix relies on a scheme cache which goes out of
sync if you switch from MELPA to Guix to install the package, or vice versa.

Once you've sorted out the install, delete ~/.cache/guile/ccache, and restart Emacs.

> Last, 'guix package -s gmsh' returns the package that I am looking for.
> However, `M-x guix p n gmsh' does not.

For me, there is no "n" in `M-x guix p`.  Anyways, you are probably better off
using `M-x guix-packages-by-name`.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-03 11:26 ` Pierre Neidhardt
@ 2019-01-03 12:22   ` zimoun
  2019-01-03 13:10     ` Pierre Neidhardt
  0 siblings, 1 reply; 8+ messages in thread
From: zimoun @ 2019-01-03 12:22 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Dear Pierre,

Thank you for your answer.

> I strongly recommend that you install emacs-guix from Guix only, and not from
> MELPA.  The thing is that Emacs-Guix relies on a scheme cache which goes out of
> sync if you switch from MELPA to Guix to install the package, or vice versa.

Hum? ok even if I am not sure to understand.
From my understanding, emacs-guix just eases the install of the
non-elisp packages, e.g., guile.
If I install the non-elisp requirements with Guix then emacs-guix from
MELPA, it should work the same, isn't it?
The ELisp code of emacs-guix installed with Guix lives in /gnu/store
and the one of emacs-guix from MELPA lives in your personnal
site-package.

However, it is a bad idea to mix ELisp from Guix and from MELPA. I agree.


> > Last, 'guix package -s gmsh' returns the package that I am looking for.
> > However, `M-x guix p n gmsh' does not.
>
> For me, there is no "n" in `M-x guix p`.  Anyways, you are probably better off
> using `M-x guix-packages-by-name`.

The command `M-x guix-package-by-name` works; with the two ways of installation.
However, the popup interface does not; with the error
"guix-popup-format-profile: Symbol’s value as variable is void:
guix-current-profile"

With this popup interface, the sequence `M-x guix p n' is roughly
speaking a shortcut for `M-x guix-packages-by-name'.
https://emacs-guix.gitlab.io/website/manual/latest/emacs-guix.html#Popup-Interface

Thank you in adavance for any tips.

All the best,
simon

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-03 12:22   ` zimoun
@ 2019-01-03 13:10     ` Pierre Neidhardt
  2019-01-03 17:54       ` zimoun
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2019-01-03 13:10 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]


> From my understanding, emacs-guix just eases the install of the
> non-elisp packages, e.g., guile.

No, emacs-guix is simply an interface to Guix, it allows you to install any
Guix package, Emacs-related or not.

> If I install the non-elisp requirements with Guix then emacs-guix from
> MELPA, it should work the same, isn't it?

No, because the MELPA version and the Guix version are not the same and the
requirements might be different.

Emacs package management is rather simple while Guix gives you much more power,
including reproducibility.  If you install everything from Guix, it gives you a
fairly strong guarantee that things will work out of the box.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-03 13:10     ` Pierre Neidhardt
@ 2019-01-03 17:54       ` zimoun
  0 siblings, 0 replies; 8+ messages in thread
From: zimoun @ 2019-01-03 17:54 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Dear Pierre,

> > If I install the non-elisp requirements with Guix then emacs-guix from
> > MELPA, it should work the same, isn't it?
>
> No, because the MELPA version and the Guix version are not the same and the
> requirements might be different.

Ok, I naively assumed that they were synced.
My bad.
A quick check proves me that they are not. :-)


Well, it does not solve the issue.
The emacs-guix popup installed with Guix does not work, neither.

clean ~/.emacs.d
clean ~/.cache
guix package -i emacs-guix
emacs # version 26.1
M-x guix

Then there is issue with the menu. For example the letter p is binded
to processes and also to package.
But it is another story. :-)


> Emacs package management is rather simple while Guix gives you much more power,
> including reproducibility.  If you install everything from Guix, it gives you a
> fairly strong guarantee that things will work out of the box.

Yes for sure. :-)
But when I install ELisp packages with MELPA, then I can easily modify
on-the-fly the code of some function, e.g., change the docstring or
add message or whatever.
Easily because I am just doing `M-x find-function foo' then I edit
`foo' as I want.
When installed with Guix, it is not "so easy" because the ELisp
package lives in the store and it is not a good idea to modify it. So
I need to extract the function, etc.
That's why I prefer MELPA for emacs packages than Guix (or Debian or
whatever) package management. :-)


Thank you for your explanations.

All the best,
simon

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-02 15:34 Emacs-guix: variable is void: guix-current-profile zimoun
  2019-01-03 11:26 ` Pierre Neidhardt
@ 2019-01-03 18:10 ` Alex Kost
  2019-01-03 21:58   ` zimoun
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Kost @ 2019-01-03 18:10 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix

zimoun (2019-01-02 16:34 +0100) wrote:

> Dear,
>
> Happy New Year !
>
> Thank you this nice interface !!
>
> I am have installed Guix on the top of Debian.
> If I understand well, I installed the packages guile, guile-gcrypt and
> Emacs, obviously. :-)
> And emacs-guix comes from MELPA, Geiser too.
> Then I am a bit confused.
>
> M-x guix pops up.
> However, press p leads to the message:
> "guix-popup-format-profile: Symbol’s value as variable is void:
> guix-current-profile"
> But, C-h v guix-current-profile returns
> "/var/guix/profiles/per-user/simon/guix-profile"

Ouch, this is a bug!  Sorry and thank you for the report!
It should be fixed by the latest commit:

  https://notabug.org/alezost/emacs-guix/commit/d7b54784bc3962570519aac472f54598c10299ae

So you may try to reinstall it from MELPA to check if it works now.  BTW
installing from MELPA should be as fine, as from Guix.  As far as I
understand, the problems you faced are not related to the way you
install Emacs-Guix.

> Last, 'guix package -s gmsh' returns the package that I am looking for.
> However, `M-x guix p n gmsh' does not.
> I need to do 'guix package -i guix' to find gmsh with emacs-guix. Hum?

Yes, this is a big problem on non-GuixSD systems.  In short, "guix pull"
does not install its guile dependencies in the pulled profile.  Instead
they are hardcoded in "~/.config/guix/current/bin/guix", so Emacs-Guix
can't use these modules and this leads to unexpected errors.

The only workaround is to install "guix" in a user profile: this will
automatically "propagate" (install) all the missing Guile dependencies.

People usually don't face this problem on GuixSD because "guix" (thus,
all its propagated dependencies) is installed in a system profile there.

I don't see a way to fix this problem on the Emacs-Guix side.  For more
details, you may look at the discussion at
<https://github.com/alezost/guix.el/issues/28>.

-- 
Alex

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-03 18:10 ` Alex Kost
@ 2019-01-03 21:58   ` zimoun
  2019-01-04 20:20     ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: zimoun @ 2019-01-03 21:58 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

Dear Alex,

Thank you for your answer and the nice emacs-guix interface.


> It should be fixed by the latest commit:
>
>   https://notabug.org/alezost/emacs-guix/commit/d7b54784bc3962570519aac472f54598c10299ae
>
> So you may try to reinstall it from MELPA to check if it works now.  BTW
> installing from MELPA should be as fine, as from Guix.  As far as I
> understand, the problems you faced are not related to the way you
> install Emacs-Guix.

After the reinstall from MELPA, it appears to me that the guix popup
works as expected. :-)

Note that the popup does work properly with emacs-guix, since the
letter p is binded twice (processes and package).
I guess that the next release (available in MELPA) will fix this.


> > Last, 'guix package -s gmsh' returns the package that I am looking for.
> > However, `M-x guix p n gmsh' does not.
> > I need to do 'guix package -i guix' to find gmsh with emacs-guix. Hum?
>
> Yes, this is a big problem on non-GuixSD systems.  In short, "guix pull"
> does not install its guile dependencies in the pulled profile.  Instead
> they are hardcoded in "~/.config/guix/current/bin/guix", so Emacs-Guix
> can't use these modules and this leads to unexpected errors.
>
> The only workaround is to install "guix" in a user profile: this will
> automatically "propagate" (install) all the missing Guile dependencies.
>
> People usually don't face this problem on GuixSD because "guix" (thus,
> all its propagated dependencies) is installed in a system profile there.
>
> I don't see a way to fix this problem on the Emacs-Guix side.  For more
> details, you may look at the discussion at
> <https://github.com/alezost/guix.el/issues/28>.

Hum? I am too newbie to have an opinion. :-)

A random idea.
What Guix needs to expose to emacs-guix?
And these missing guile modules should be packed to e.g. guix-minimal.
What do you think?


Thank you again.

All the best,
simon

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

* Re: Emacs-guix: variable is void: guix-current-profile
  2019-01-03 21:58   ` zimoun
@ 2019-01-04 20:20     ` Alex Kost
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Kost @ 2019-01-04 20:20 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix

zimoun (2019-01-03 22:58 +0100) wrote:

> Dear Alex,
>
> Thank you for your answer and the nice emacs-guix interface.

Thanks :-)

>> It should be fixed by the latest commit:
>>
>>   https://notabug.org/alezost/emacs-guix/commit/d7b54784bc3962570519aac472f54598c10299ae
>>
>> So you may try to reinstall it from MELPA to check if it works now.  BTW
>> installing from MELPA should be as fine, as from Guix.  As far as I
>> understand, the problems you faced are not related to the way you
>> install Emacs-Guix.
>
> After the reinstall from MELPA, it appears to me that the guix popup
> works as expected. :-)
>
> Note that the popup does work properly with emacs-guix, since the
> letter p is binded twice (processes and package).
> I guess that the next release (available in MELPA) will fix this.

The current Emacs-Guix release (0.5.1) already has a fix for it
("processes" is bound to "o" there), so it looks like you installed some
previous version of emacs-guix with guix.  Make sure your guix is
up-to-date.  Have you ever run "guix pull"?

>> > Last, 'guix package -s gmsh' returns the package that I am looking for.
>> > However, `M-x guix p n gmsh' does not.
>> > I need to do 'guix package -i guix' to find gmsh with emacs-guix. Hum?
>>
>> Yes, this is a big problem on non-GuixSD systems.  In short, "guix pull"
>> does not install its guile dependencies in the pulled profile.  Instead
>> they are hardcoded in "~/.config/guix/current/bin/guix", so Emacs-Guix
>> can't use these modules and this leads to unexpected errors.
>>
>> The only workaround is to install "guix" in a user profile: this will
>> automatically "propagate" (install) all the missing Guile dependencies.
>>
>> People usually don't face this problem on GuixSD because "guix" (thus,
>> all its propagated dependencies) is installed in a system profile there.
>>
>> I don't see a way to fix this problem on the Emacs-Guix side.  For more
>> details, you may look at the discussion at
>> <https://github.com/alezost/guix.el/issues/28>.
>
> Hum? I am too newbie to have an opinion. :-)

No problem, I just tried to describe this problem.

> A random idea.
> What Guix needs to expose to emacs-guix?
> And these missing guile modules should be packed to e.g. guix-minimal.
> What do you think?

I think guix should either install its guile dependencies to the pulled
profile (as it does with any usual profile), or make an auxiliary file
with "Guile load path" environment that can be used both by
"~/.config/guix/current/bin/guix" and by Emacs-Guix.

-- 
Alex

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

end of thread, other threads:[~2019-01-04 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-02 15:34 Emacs-guix: variable is void: guix-current-profile zimoun
2019-01-03 11:26 ` Pierre Neidhardt
2019-01-03 12:22   ` zimoun
2019-01-03 13:10     ` Pierre Neidhardt
2019-01-03 17:54       ` zimoun
2019-01-03 18:10 ` Alex Kost
2019-01-03 21:58   ` zimoun
2019-01-04 20:20     ` Alex Kost

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.