Guix-emacs doesn't work

OpenSubmitted by Ryan Prior.
Details
3 participants
  • Giovanni Biscuolo
  • Jan Nieuwenhuizen
  • Ryan Prior
Owner
unassigned
Severity
normal
R
R
Ryan Prior wrote on 19 Apr 01:46 +0200
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
z_xkKlB0SqR5ilDbzz1euKabWhPaDl0LnXIxMKEMvZVLoZtqCYP2fUDiy3KRVlmFlVwGg7Q17ERiWrdqYcVhJBBH4OAM-z2taPdxeWJ-MMk=@protonmail.com
Hi folks! I decided to check-in on the status of the guix-emacs​ package, since my understanding is it's had a change of maintainership a little over a year ago after its previous abandonware status.

First I installed it into my normal Spacemacs setup, and that didn't work at all. Running guix-packages-by-name yielded this error:

Toggle quote (3 lines)
> if: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Unbound variable: package-names*

But I hardly blame any package for not working with Spacemacs - most packages do just fine, but occasionally when something doesn't work it's Spacemacs fault. So I set out to create a minimal reproduction. Here's what I came up with:

To start Emacs, I ran:

Toggle quote (2 lines)
> guix shell -CNPE TERM --no-cwd emacs guix emacs-guix coreutils -- emacs -nw

If my understanding is correct, this creates a container with only Emacs, Guix, and the emacs-guix elisp package installed in there, with network access and my TERM environment set but otherwise with none of my Spacemacs or other user config.

Inside this Emacs, I again ran guix-packages-by-name​ and got a nearly identical error:

Toggle quote (3 lines)
> guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Unbound variable: package-names*

For completeness, I also tried a few other commands, like guix-installed-packages​ and guix-profiles-show​. These each have subtly different errors, but none of them remotely work.

Those of us who use Emacs and have some experience with elisp and Guile should consider swarming on this package to get it working, since it is a touted feature with Guix in the name, so people try when they're giving Guix a shot. A working Emacs integration would be something I'd use every day and a great showcase for what Guix can do when integrated into hacking workflows.

If that's proves not to be feasible, we might want to consider deprecating the package, removing it from Guix and Melpa. Its protracted state of disrepair and uselessness (it hasn't worked since I started using Guix in ~2018) may be giving people the impression that Guix is not well maintained. This should be a last resort, as getting the package working would be dramatically preferable, but there are stakes here in terms of cost to Guix reputation that imo cannot be ignored.

Cheers,
Ryan
Attachment: file
G
G
Giovanni Biscuolo wrote on 21 Apr 11:50 +0200
87r15qhiis.fsf@xelera.eu
Hello Ryan,

unfortunately guix-emacs never worked for me too, in the last couple of
years

Ryan Prior via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

[...]

Toggle quote (4 lines)
> To start Emacs, I ran:
>
>> guix shell -CNPE TERM --no-cwd emacs guix emacs-guix coreutils -- emacs -nw

I'm running Guix on Debian, using a dedicated profile for Emacs with
many packages installed, emacs-guix included; I'm not using
Spacemacs... but I cannot exclude some status in my ~/emacs.d is
interfering

This is my version:

Toggle snippet (6 lines)
GNU Guix 1.3.0.6907-92fdd-dirty
Emacs-Guix 0.5.2


GNU Guix... "dirty" version? I have to check, but it seems unrelated.

[...]

Toggle quote (5 lines)
> Inside this Emacs, I again ran guix-packages-by-name​ and got a nearly identical error:
>
>> guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> Unbound variable: package-names*

Running the same command "guix-packages-by-name", I also get the
(almost) same error (from *Messages* buffer):

Toggle snippet (10 lines)
Starting Guix REPL ... [5 times]
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: package-names*: unbound variable

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(emacs-guix) [1]>


Toggle quote (3 lines)
> For completeness, I also tried a few other commands, like
> guix-installed-packages​

with "guix-installed-packages" I get this error:

Toggle snippet (9 lines)
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: package/output-sexps: unbound variable

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(emacs-guix) [2]>


[...]

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmJhKPwMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSC10QAMi+lehu9x5KxvNqZ7v/Bli5kzHUy9YcVW4eWvFB
UfhSUm3bHj81z46kYsxXJUaFZE9YT81VecGRKO9V682kyaJslKBxLl1h4jb4oTMi
UvsVoxLEBVSabk3lvGKcee0Ay+gh/S8HggrIoeiNKPaJZ8qC6AFoIGDa7Qx7lTbO
7USNn2vA4st1HF45pYxVVRFH54JRnUhREtaMOHHNd8TZfgeJKjjdDMElT68deO5/
Ro0XNXrj3rPnDG48c9loRgRXrSjMzQnK2ixebnFzTzKlDiAvETevmiEnLWxan8v3
Kzrh+wHzIBMi+0JQzniOspU69ZY5uOg054ywV1//x8vj2L4WNr5D0GPc/5GojvJ7
QnVxJicxxC4lxWSdZef6NxcNIXDFn6EvlgSsWBLpHilsi3F27EM5hjTVUIMk1g+i
ewEXHGPp+Mnsa4Q4Si4QX5FkTBkwodRXJqXESXMn4cHVs8ftS2vYm0HfL47Gamn4
OGH95ALWvRxkNUNGyjTWAnoqD+xrh9Kq2LS3RhrnTxDLvubzZdnrC8RkNIggHF5F
gG6ODd+McQm58yV1aLGn6rb5nT7UFaAoSBqJKGfSn18HjHJ94FQaSVw9AjuYm9zj
bUcKcOeUDUe6AyFyTjxU7Ue+xHeX00TRUAqeGrufjEoNYZ6S0DeviYaNk00q6x2T
/+4W
=oxCH
-----END PGP SIGNATURE-----

G
G
Giovanni Biscuolo wrote on 21 Apr 16:17 +0200
871qxqjzau.fsf@xelera.eu
Hello Ryan,

I was able to solve.

Giovanni Biscuolo <g@xelera.eu> writes:

Toggle quote (3 lines)
> unfortunately guix-emacs never worked for me too, in the last couple of
> years

actually, some command worked some time ago (e.g. profiles list) but I
was never able to use guix-emacs to view packages, for exemple

I have updated today, now my version is:

Toggle snippet (6 lines)
GNU Guix eb34ff16cc9038880e87e1a58a93331fca37ad92
Emacs-Guix 0.5.2


but I doubt the issue was version related since the emacs-guix package
version is the same

[...]

Toggle quote (14 lines)
> Running the same command "guix-packages-by-name", I also get the
> (almost) same error (from *Messages* buffer):
>
> --8<---------------cut here---------------start------------->8---
>
> Starting Guix REPL ... [5 times]
> guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> error: package-names*: unbound variable
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> scheme@(emacs-guix) [1]>
>
> --8<---------------cut here---------------end--------------->8---

The most similar upstream bug is this one:

In that thread Adam Porter points to this comment that explains how to
start Guix REPL instead of Guile REPL, from emacs-guix:

Toggle snippet (9 lines)
(with-eval-after-load 'guix-repl
(setq guix-guile-program '("guix" "repl")
guix-config-scheme-compiled-directory nil
guix-repl-use-latest nil
guix-repl-use-server nil))


Evaluating the above code /before/ starting any emacs-guix command (thus
before starting Guile REPL) all is working well now!

I repeat, I'm using emacs-guix on a foreing distro, I don't know if on
Guix System this workaround is not needed.

[...]

HTH! Ciao, Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmJhZ4oMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkS/PwQANFbTdHM63fTpc9F+PICmVkIu3i4Y153tvzlqVoM
il/+HnWMWZ9STVHacX5mPnDSl93nbXePEmTUBVSXx8kKn/dQmL4JQIx3WgF/hdxu
CGi1gu00pGJQK4pO7LRgT8Vc4AhpgVFvj9BYvyzjmos7/XM/LK5PJaqADPiikXJW
47KngBdvCZaTZH4YlAeeIqddky5G3CVBjO15q5s3quK58hDgYuD5WZTs2GKGmy6k
pp3ftoaFfkquHK3wKEqFdux/65Mfo8MrsX6zv0I/sCLcm2+5Z3lvFv2WyfVXP0ma
gsVe5Xptl7m5UrZNmre2zV0HixRD2m8vnpitP/s4I18pOcEQi6hkM5EGrgexZGfE
bLmzFWyFdVSEFrqeOMexO1meiKxj4+IGB6UTZemYXzAl3tMqWevIFDVagX9rjgvJ
ISOmmU14UCLLbOsppQoRjtdo86fiVYrevHu6tr+Py+1qJjzdaNVCDcpa9oZjhXlo
74YxfHMiKaVWIFRgobl+Css4YpuZmSH6T2p44FW+e8smsZ7ZnD+RJgMAmU6+NaVu
JKJh1D3uBvtdB+IMH9OraGSQju+UlF5i9uBTx1dW6mqyTbrL5mic9S62qBzC5cwc
Up8sQ7u+RtP4SgZj5QcbWacgvCZTwjO9sUIH6yDtMYXhNDHCQe604Wb7glLclNWY
7IMq
=9UqE
-----END PGP SIGNATURE-----

J
J
Jan Nieuwenhuizen wrote on 22 Apr 07:27 +0200
(name . Giovanni Biscuolo)(address . g@xelera.eu)
87o80tvgat.fsf@gnu.org
Giovanni Biscuolo writes:

Hi!

Toggle quote (2 lines)
> I was able to solve.

Great!

Toggle quote (3 lines)
> I repeat, I'm using emacs-guix on a foreing distro, I don't know if on
> Guix System this workaround is not needed.

I'm on Guix System and emacs-guix's command line completion hasn't
worked for me for about a year. Starting an emacs shell and typing
"guix TAB", I got

Starting Guix REPL ... [5 times]
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
/home/janneke/.config/guix/current/share/guile/site/3.0/guix/scripts/deploy.scm:169:7: Unknown # object: "#~"

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(emacs-guix) [1]>

Toggle quote (16 lines)
> The most similar upstream bug is this one:
> https://gitlab.com/emacs-guix/emacs-guix/-/issues/23
>
> In that thread Adam Porter points to this comment that explains how to
> start Guix REPL instead of Guile REPL, from emacs-guix:
> https://gitlab.com/emacs-guix/emacs-guix/-/issues/19#note_559028370
>
> (with-eval-after-load 'guix-repl
> (setq guix-guile-program '("guix" "repl")
> guix-config-scheme-compiled-directory nil
> guix-repl-use-latest nil
> guix-repl-use-server nil))
>
> Evaluating the above code /before/ starting any emacs-guix command (thus
> before starting Guile REPL) all is working well now!

This sort-of works for me, i.e., typing "guix TAB" in an emacs shell
buffer no longer gives this error...but there also are no completions.

My ~/.emacs/init_bash.sh is empty and I seem to remember having
something there?

Greetings,
Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
G
G
Giovanni Biscuolo wrote on 27 Apr 11:13 +0200
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)(address . 55013@debbugs.gnu.org)
87a6c6j3cb.fsf@xelera.eu
Hi Jan,

sorry for this late reply,

Jan Nieuwenhuizen <janneke@gnu.org> writes:

[...]

Toggle quote (3 lines)
> I'm on Guix System and emacs-guix's command line completion hasn't
> worked for me for about a year.

it does not work for me too, but with a very different behaviour:

[...]

Toggle quote (6 lines)
>> Evaluating the above code /before/ starting any emacs-guix command (thus
>> before starting Guile REPL) all is working well now!
>
> This sort-of works for me, i.e., typing "guix TAB" in an emacs shell
> buffer no longer gives this error...but there also are no completions.

with the completion pattern "guix <TAB>" I get "guix --help" right in
the shell (and eshell) buffer but if I try any other pattern, e.g. "guix
pa<TAB>", I just get "No match" in the minibuffer (and no debug tracing
in the "*Guix REPL*" buffer)

I read (emacs-guix)Completions and it seems I do not need to configure
anything to have completion in shell and eshell when emacs-guix is
installed: do I miss something? Actually I never configured
shell/eshell completion for any command, so I may be missing something.

Maybe the workaround I use to start guix REPL:

[...]

Toggle quote (6 lines)
>> (with-eval-after-load 'guix-repl
>> (setq guix-guile-program '("guix" "repl")
>> guix-config-scheme-compiled-directory nil
>> guix-repl-use-latest nil
>> guix-repl-use-server nil))

is breaking completion?

Toggle quote (3 lines)
> My ~/.emacs/init_bash.sh is empty and I seem to remember having
> something there?

I don't have that file.

Anyway, Jan, I think this bug is different from the one in the subject,
we should have a look upsteam (eventually linking here some ref) and
open a new upsteam bug report if needed: WDYT?

Toggle quote (7 lines)
>
> Greetings,
> Janneke
>
> --
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
--
Giovanni Biscuolo

Xelera IT Infrastructures
G
G
Giovanni Biscuolo wrote on 27 Apr 11:16 +0200
877d7aj383.fsf@xelera.eu
Hi Ryan,

Giovanni Biscuolo <g@xelera.eu> writes:

[...]

Toggle quote (20 lines)
> The most similar upstream bug is this one:
> https://gitlab.com/emacs-guix/emacs-guix/-/issues/23
>
> In that thread Adam Porter points to this comment that explains how to
> start Guix REPL instead of Guile REPL, from emacs-guix:
> https://gitlab.com/emacs-guix/emacs-guix/-/issues/19#note_559028370
>
> --8<---------------cut here---------------start------------->8---
>
> (with-eval-after-load 'guix-repl
> (setq guix-guile-program '("guix" "repl")
> guix-config-scheme-compiled-directory nil
> guix-repl-use-latest nil
> guix-repl-use-server nil))
>
> --8<---------------cut here---------------end--------------->8---
>
> Evaluating the above code /before/ starting any emacs-guix command (thus
> before starting Guile REPL) all is working well now!

please can you confirm the above workaround is also working for you?

In that case we should close this bug, WDYT?

[...]

Thanks, Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmJpCewMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSD2EP/1ump+fW+jkf9SvwSp0eW2XkBC+wP5KgeAt+Ml23
vNKk+dJ6xwYoK9HcUKd3+rl1OqvEqJAzyEBepzIIApGtY/w1ekb5POsKLnbXNITb
D7NT9o+xxpgOyKX6up3FgPxdHVaXc7bSSBhRniIWgUWKUNIux1bUIrLg5dKjIo8/
IrTv2pmIq9s0pBH2BVuHcV1b7Vyg2Ku57tEv6gqEJBAS75kc7nc0H+g2E/u+eMHA
doKbvtDG4KtKkxJcq8iPrvrFFjuCZYYIigNAocpFg2G7E68mB1mmDSdEN4Dl4L1B
BlbQjdw/AY0y2zYTwX4R4qcboBGQ8ewF8qt9XAKANmV89FZmyUBLmZdVU5F5ZgmA
7YzcrAXfNGCTjsK0eMM0JpuKsIOSVZ3Pu7uehNS80QYJyMAmso0O/eBl4nV2FOTh
uT85znYba8ugUwHCyt0Thnp22tX0p8ddkf6b2Gjc7YKd6Hvk67CA1ruMN0G+fHSF
IjMA2txPeB3UP1xVY/AD9Chh50mFe36DFM4sunelAVCP5KYkXCaX8RiDTJNHkW0J
eSIpDFcnMXWG2dkNru1Q/+efzxHvWkLvPXw1fVy49cJgNDdFUO0HPzJ5JvZGmDh1
l1cnfmJVFXbk5PQ6mGKqwMT4owuqTtrGiMDbyMgZnVbhN2k28rCXjjwrsAr5+oRX
hS00
=SlrG
-----END PGP SIGNATURE-----

?