Guix-emacs doesn't work

  • Open
  • quality assurance status badge
Details
4 participants
  • Giovanni Biscuolo
  • Jan Nieuwenhuizen
  • Ricardo Wurmus
  • Ryan Prior
Owner
unassigned
Submitted by
Ryan Prior
Severity
normal
R
R
Ryan Prior wrote on 19 Apr 2022 01:46
(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 2022 11:50
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 2022 16:17
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 2022 07:27
(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 2022 11:13
(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 2022 11:16
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-----

R
R
Ricardo Wurmus wrote on 20 Mar 2023 20:09
Guix-emacs doesn't work
(address . 55013@debbugs.gnu.org)
87jzzbjl2g.fsf@elephly.net
Hi,

this no longer seems to be a problem. Can you please confirm that this
issue can be closed now?

--
Ricardo
G
G
Giovanni Biscuolo wrote on 22 Mar 2023 07:51
87mt45xoqa.fsf@xelera.eu
Hi,

Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (5 lines)
> Hi,
>
> this no longer seems to be a problem. Can you please confirm that this
> issue can be closed now?

unfortunately emacs-guix still does not work (in my setup)

If I try to list packages or profiles I always get:

Toggle snippet (6 lines)
Starting Guix REPL ... [2 times]
geiser-repl--wait-for-prompt: No prompt found!


even if I apply the "workaround" that worked for me some time ago

I don't have muchi time right now, probably tonight I'll try to check if
this depends on my configuration and will do some test

Thanks! Gio'

--
Giovanni Biscuolo

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

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmQapY0MHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkS8HQP/2Gg68t1LjrjpWEy7MCqq7Z17MhARC7wDKdmNMsL
OQZd9SDsdNp1amF3+XEATX8RpI6KFrEercsPW8iSBLiZ6db5UyGbZeZfsoN9tUIl
FvLpQ1wTaBc+7CapUeya0mzi/B11i21V0I7CStnqdzptqPNElc7wNN5QjerVV6uN
6b+5zEwpv+GsHiJMisD9QrmHkNjGSrAGFIRfSPVknmHvgPRfY5frwimcxepOEIBO
PaJUbeyL/NSnx9+tmI/yI7T2MCS1R1WHKKl5X3i0iHfB5vKCAfcVvx2J39Tr5YK5
BXATj8/I8eqw8VRQzg+Dixs5H4zXORnC8EdYh8LcbZjLOtCi9yX2ndAn+XxsJc3t
yr9Rcsr2dPKiKrN1ba5SNpNM3AnT0RMB6DlUnT9lp5y3RH/DTZ7JnyTi9RJLRwJw
/ILaAiQBmEkIuKoqMOBepPZQQ5XFfVHvc0MmEYRLCHEhAYgSzcDQKLkgZ0YyH49T
yI57pnc2u/522jz92LCbqQNhi6QLjyamqESSLfxB8+7zch5BkVAKPxkBBrJDVEkX
LISpQUuTfGWt/Q6SoGqYubYHCUghJM1q4II55qHW8MyJMh/hnQgmfpDOG8ZtWDGZ
OIGztQLH1g8sZe0WDWy7mt47EKEM5QkUKTJQKGME5x4T/BrXOanqkgjupIhV2McJ
chuh
=1B2o
-----END PGP SIGNATURE-----

G
G
Giovanni Biscuolo wrote on 23 Mar 2023 14:32
87h6uby4ng.fsf@xelera.eu
Hi,

Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (3 lines)
> this no longer seems to be a problem. Can you please confirm that this
> issue can be closed now?

When starting guix-emacs with "M-x guix" and trying listing profiles or
packages I always get this error:

Toggle snippet (6 lines)
Starting Guix REPL ... [2 times]
geiser-repl--wait-for-prompt: No prompt found!


Some time ago (see this bug thread, 2022-04-21) I was able to apply this
workaround:

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


but now it's not working anymore.

If I start emacs in a shell with:

Toggle snippet (5 lines)
guix shell -n emacs-no-x-toolkit emacs-guix -- emacs -q


and emacs-guix with "M-x guix", then try to list profiles or packages
but I get this error message:

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:
Unbound variable: %max-returned-list-size

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


I'm still not able to run emacs-guix, how I can help debugging this?

Thanks! Gio'

--
Giovanni Biscuolo

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

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmQcVPMMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSndYP/1DjiFV0tGIdE4quLKtNR9x30E4UUKEuFvwhL5+J
8DGeU9SOS7n25tUR5W2AZJ0Mo+zZg+whIfqejUeQWaClGxlX5vITks1pchvTzEDv
+J9KF9DLTBEN1ZyzoaTOcqDxGFKeLKxILt6InO2gh0uf81p7cGfyCatdpJguPOI/
G5esEDYIJmVwpk/g9X4l6F/Xcvr7FMth76NrF1stb5ONaE4ftHRvViKgYTR8Pgxc
cLAD1szJWPu9L0T/0Dl3EnKV+Z/0kyELTuC2ClmV5KEzKCJIda5h1pb5DiFnNA6a
BvNdjitwtRoz5nFKlc9lyWU1HgKM2oX2JCEQFadWO9OPCkpIKOpU+3h3sQ7uq07T
Qld8QYg075l8czg7HUDeM+hlZeZJdEyErlN2x11fvMjd2S0H4bEOYv6grnTnpMYS
v1zcndDvj6vTKGLJ6nWOKh3syzzA43DznS40FHoyW8Ichn3dAAI7A40obkYJHJdl
TU7dYOqnFyx/uCRM4YF4mrdv2co/x8zjbhA6tom061ToR9tPM7soeunO1qo3DhIC
PtvTbkHneT48y5XV7T7LClKJ0SHgZcXCsAoa7xPYgUgOl/uRqas9jqTdf2/yNi3L
VvycCPA7+eXxapWQPE6duV+aOwqMD2HNJNJS/MushStZaWGb4cTDh8J1xbqOQpeg
E3NH
=lDRV
-----END PGP SIGNATURE-----

G
G
Giovanni Biscuolo wrote on 23 Mar 2023 15:10
87edpfy2vr.fsf@xelera.eu
Hi,

Giovanni Biscuolo <g@xelera.eu> writes:

Toggle quote (10 lines)
> When starting guix-emacs with "M-x guix" and trying listing profiles or
> packages I always get this error:
>
> --8<---------------cut here---------------start------------->8---
>
> Starting Guix REPL ... [2 times]
> geiser-repl--wait-for-prompt: No prompt found!
>
> --8<---------------cut here---------------end--------------->8---

Sorry the above message is misleading: I did not realize that I already
had a "Guix REPL" already open, I killed the REPL and this is the error
message I get when I start "M-x guix" and then try to gel my profiles
list:

Toggle snippet (10 lines)
Starting Guix REPL ... [3 times]
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: %max-returned-list-size

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


(That's the same I get when I start emacs-guix in a guix shell)

This is the error I get in the "Guix REPL" buffer:

Toggle snippet (16 lines)
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> ,m (emacs-guix)
While executing meta-command:
no code for module (guix ui)
scheme@(guile-user)>


this is the backtrace

Toggle snippet (11 lines)
scheme@(guile-user)> ,bt
2 (eval (#<procedure 7fae8f34be70 at <unknown port>:8:56 ()>) #<directory (guile-user) 7fae9151fc80>)
In current input:
8:23 1 (_)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
scheme@(guile-user) [1]>


if I "manually" give the same command in the REPL buffer, I get no
error:

Toggle snippet (6 lines)
scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix) [1]>


then I try again to list all my profiles via "M-x guix" (then select "P"
and "a") but I get the following message:

Toggle snippet (9 lines)
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: user-profiles

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


But now the "Guix REPL" does not give any error, it's "stopped" at the
same prompt given above ("scheme@(emacs-guix) [1]>")

[...]

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
G
G
Giovanni Biscuolo wrote on 23 Mar 2023 15:11
87cz4zy2vc.fsf@xelera.eu
Hi,

Giovanni Biscuolo <g@xelera.eu> writes:

Toggle quote (10 lines)
> When starting guix-emacs with "M-x guix" and trying listing profiles or
> packages I always get this error:
>
> --8<---------------cut here---------------start------------->8---
>
> Starting Guix REPL ... [2 times]
> geiser-repl--wait-for-prompt: No prompt found!
>
> --8<---------------cut here---------------end--------------->8---

Sorry the above message is misleading: I did not realize that I already
had a "Guix REPL" already open, I killed the REPL and this is the error
message I get when I start "M-x guix" and then try to gel my profiles
list:

Toggle snippet (10 lines)
Starting Guix REPL ... [3 times]
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: %max-returned-list-size

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


(That's the same I get when I start emacs-guix in a guix shell)

This is the error I get in the "Guix REPL" buffer:

Toggle snippet (16 lines)
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> ,m (emacs-guix)
While executing meta-command:
no code for module (guix ui)
scheme@(guile-user)>


this is the backtrace

Toggle snippet (11 lines)
scheme@(guile-user)> ,bt
2 (eval (#<procedure 7fae8f34be70 at <unknown port>:8:56 ()>) #<directory (guile-user) 7fae9151fc80>)
In current input:
8:23 1 (_)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
scheme@(guile-user) [1]>


if I "manually" give the same command in the REPL buffer, I get no
error:

Toggle snippet (6 lines)
scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix) [1]>


then I try again to list all my profiles via "M-x guix" (then select "P"
and "a") but I get the following message:

Toggle snippet (9 lines)
guix-geiser-eval: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: user-profiles

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


But now the "Guix REPL" does not give any error, it's "stopped" at the
same prompt given above ("scheme@(emacs-guix) [1]>")

[...]

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
R
R
Ricardo Wurmus wrote on 23 Mar 2023 17:31
(name . Giovanni Biscuolo)(address . g@xelera.eu)
878rfnig46.fsf@elephly.net
Hi Giovanni,

thank you for testing.

Can you please confirm that this is reproducible even in “guix shell -C”?

--
Ricardo
G
G
Giovanni Biscuolo wrote on 23 Mar 2023 18:06
(name . Ricardo Wurmus)(address . rekado@elephly.net)
874jqbxuq5.fsf@xelera.eu
Hi Ricardo,

Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (7 lines)
> Hi Giovanni,
>
> thank you for testing.
>
> Can you please confirm that this is reproducible even in “guix shell
> -C”?

It's reproducible but with a minor difference: I also get a buffer named
*Guix Internal REPL* (see below)

I'm not able to start a graphical emacs container, I get only a text
interface (but I guess it's the same for the scope of this bug report):

Toggle snippet (5 lines)
guix shell --preserve='^DISPLAY$' --preserve="^TERM" --preserve='^XAUTHORITY$' -C emacs-no-x-toolkit emacs-guix -- emacs -q


in *Messages* I get:

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:
Unbound variable: %max-returned-list-size

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


but this time I get 2 REPL: one named "*Guix REPL*" with this prompt:

Toggle snippet (8 lines)
scheme@(guile-user)> ,m (emacs-guix)
While executing meta-command:
no code for module (guix ui)
scheme@(guile-user)>


and a second one named "*Guix Internal REPL*" (missing in my previous
tests) with this prompt:

Toggle snippet (6 lines)
scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix)>


I missed to report that I also see a third *Geiser Messages* (also
present in my previous tests) buffer with this content:

Toggle snippet (26 lines)
INFO: <3>: processed

INFO: REQUEST: <4>: (begin ((@ (system repl debug) terminal-width) 999) (quote ok))

INFO: RETORT: ((error (key . retort-syntax)) (output . "$8 = ok
scheme@(guile-user)> ") (debug))

INFO: <4>: processed

INFO: REQUEST: <5>: ,use (geiser emacs)
'done

INFO: RETORT: ((error (key . retort-syntax)) (output . "$9 = done
scheme@(guile-user)> ") (debug))

INFO: <5>: processed

INFO: REQUEST: <6>: ,geiser-eval (geiser evaluation) ge:set-warnings ((quote medium)) ()

INFO: RETORT: ((result "#<unspecified>") (output . ""))

INFO: <6>: processed


Thanks! Gio'

--
Giovanni Biscuolo

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

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmQchzIMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSMtQP/18MJSNIeQjrTuT1CVRLYmklAt1ElE+R1SDTQWmS
UgSEd+EiReHPHiMDCoh+cVVkHC5NVXmz0MHKMnS9GswDpz+c66CouNhrNeGNFOxL
JS9ILVDMjQ0LX3xJZgd+tUPv3A8PC4LKSMi7wqNUzHGRl5K2756inl9NTXPADh0X
zvu8j7Ap/1FZvQnh6l/uCTlvHIYxuXiNdZXCsE0oHaBWTO+MB/AThvYKA/Tyrj6M
S5JDDQ022c02ICSzu2Ort6xc++uUXgRptLU0JosKoV0iqWM6gFj81AGv1h86EoV0
06BU4fm789UJi8cqWJUlpw3Vm3cWmboYy80D2ax2QMAvVGtyCuxftX43erjjeFXg
2rxvzQFT3haESypX3nZMUoosHdnChnOVh7w8KOfuhafBCJ+TsHBo4j96fqOQNAlf
uoEA181rWjK94b1g9t7iy2X9I/Nk8e8g4SGpSrLRd9zd7R6neEMe+nH4zB6Q8mMb
D+W6PfdtY6yRFjxqWJbSwC1fHO0/fG/vvRgCkkQGIdszzi6te243C8rezFoVVwib
JCaZOVGyGW70wkj2Et4ZHe2EGbPlFjITge8YWzlKTuwGAm2bkbos9HVwkK5KlYLX
rHXawyqAZIU1qiiKZ4qK9gYIKTXI71fbd9GNQbM3yFCq0CQUdXCZEBHVYD7S9/N6
2ghs
=kvzD
-----END PGP SIGNATURE-----

R
R
Ryan Prior wrote on 25 Mar 2023 22:00
(name . Ricardo Wurmus)(address . rekado@elephly.net)
FfUtYyKRVadAylIZzIM5yJ8pvQJBf_ka-e_nzVlj303O17Cb-dgp9Vgfllb9Bier6IbdLlo5lYWmtky0h3x4fd7_fOtZ4KS_QfN0X0zyt-4=@protonmail.com
------- Original Message -------
On Monday, March 20th, 2023 at 7:09 PM, Ricardo Wurmus <rekado@elephly.net> wrote:


Toggle quote (7 lines)
>
>
> Hi,
>
> this no longer seems to be a problem. Can you please confirm that this
> issue can be closed now?

I can confirm that the emacs-guix package is still broken.

## Steps to reproduce
1. launch Emacs in a container:
$ guix shell -C --no-cwd --expose=/gnu --expose=/var --share=/tmp -E DISPLAY emacs emacs-guix -- emacs
2. run M-x guix-installed-packages

### Expected result
A list of installed packages should appear.

### Actual result
In *Messages* buffer:
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: %max-returned-list-size

## My Guix version
$ guix --version | grep guix
guix (GNU Guix) 51f8a7aced70b7f79037bd99019dddaea07ced25

## Discussion

When I was working to create an Emacs Guix package (https://github.com/ryanprior/emacs-guix-packaging)to support my own workflows, folks were critical of how I run Guix commands in the shell and parse the output instead of building on the Emacs Guix package and its Guile REPL approach. But in practice, this package has never worked for me, I always get REPL errors.

Since then, I have often discussed emacs-guix with other Emacs users in the community and thus realized I'm far from the only one who's never once got it to work. Today, despite the efforts of multiple engineers, it remains reproducibly broken.

My inclination would be to remove entirely the dependency on Geiser and the Guix REPL, opting instead to connect to a guix-ui service over a stable HTTP API. The API endpoints would be documented and tested as part of the formal interface to Guix, and the Emacs package would become a client of that interface.

Whether you like my alternative or not, do most Guix maintainers have confidence in the current approach and think emacs-guix just needs a bugfix here or there, or does anyone else get the impression that it's unsound and needs a new approach?

Ryan
R
R
Ricardo Wurmus wrote on 25 Mar 2023 23:46
(name . Ryan Prior)(address . rprior@protonmail.com)
87mt40h2hr.fsf@elephly.net
Ryan Prior <rprior@protonmail.com> writes:

Toggle quote (13 lines)
>> this no longer seems to be a problem. Can you please confirm that this
>> issue can be closed now?
>
> I can confirm that the emacs-guix package is still broken.
>
> ## Steps to reproduce
> 1. launch Emacs in a container:
> $ guix shell -C --no-cwd --expose=/gnu --expose=/var --share=/tmp -E DISPLAY emacs emacs-guix -- emacs
> 2. run M-x guix-installed-packages
>
> ### Expected result
> A list of installed packages should appear.

FWIW M-x guix-installed-packages (and all the other stuff) works for me
with my Emacs config. I haven’t tried to reproduce this in a container
yet without my Emacs config, but I’ll try soon.

--
Ricardo
?