unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55013: Guix-emacs doesn't work
@ 2022-04-18 23:46 Ryan Prior via Bug reports for GNU Guix
  2022-04-21  9:50 ` Giovanni Biscuolo
  2023-03-20 19:09 ` Ricardo Wurmus
  0 siblings, 2 replies; 21+ messages in thread
From: Ryan Prior via Bug reports for GNU Guix @ 2022-04-18 23:46 UTC (permalink / raw)
  To: 55013

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

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:

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

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

> 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 #2: Type: text/html, Size: 4432 bytes --]

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

* bug#55013: Guix-emacs doesn't work
  2022-04-18 23:46 bug#55013: Guix-emacs doesn't work Ryan Prior via Bug reports for GNU Guix
@ 2022-04-21  9:50 ` Giovanni Biscuolo
  2022-04-21 14:17   ` Giovanni Biscuolo
  2023-03-20 19:09 ` Ricardo Wurmus
  1 sibling, 1 reply; 21+ messages in thread
From: Giovanni Biscuolo @ 2022-04-21  9:50 UTC (permalink / raw)
  To: Ryan Prior, 55013

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

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:

[...]

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

--8<---------------cut here---------------start------------->8---

GNU Guix 1.3.0.6907-92fdd-dirty
Emacs-Guix 0.5.2

--8<---------------cut here---------------end--------------->8---

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

[...]

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

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

> For completeness, I also tried a few other commands, like
> guix-installed-packages​

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

[...]

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

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

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

* bug#55013: Guix-emacs doesn't work
  2022-04-21  9:50 ` Giovanni Biscuolo
@ 2022-04-21 14:17   ` Giovanni Biscuolo
  2022-04-22  5:27     ` Jan Nieuwenhuizen
  2022-04-27  9:16     ` Giovanni Biscuolo
  0 siblings, 2 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2022-04-21 14:17 UTC (permalink / raw)
  To: Ryan Prior, 55013

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

Hello Ryan,

I was able to solve.

Giovanni Biscuolo <g@xelera.eu> writes:

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

--8<---------------cut here---------------start------------->8---

GNU Guix eb34ff16cc9038880e87e1a58a93331fca37ad92
Emacs-Guix 0.5.2

--8<---------------cut here---------------end--------------->8---

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

[...]

> 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:
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!

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

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

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

* bug#55013: Guix-emacs doesn't work
  2022-04-21 14:17   ` Giovanni Biscuolo
@ 2022-04-22  5:27     ` Jan Nieuwenhuizen
  2022-04-27  9:13       ` Giovanni Biscuolo
  2022-04-27  9:16     ` Giovanni Biscuolo
  1 sibling, 1 reply; 21+ messages in thread
From: Jan Nieuwenhuizen @ 2022-04-22  5:27 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: Ryan Prior, 55013

Giovanni Biscuolo writes:

Hi!

> I was able to solve.

Great!

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

> 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




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

* bug#55013: Guix-emacs doesn't work
  2022-04-22  5:27     ` Jan Nieuwenhuizen
@ 2022-04-27  9:13       ` Giovanni Biscuolo
  0 siblings, 0 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2022-04-27  9:13 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 55013

Hi Jan,

sorry for this late reply,

Jan Nieuwenhuizen <janneke@gnu.org> writes:

[...]

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

[...]

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

[...]

>> (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?

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

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




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

* bug#55013: Guix-emacs doesn't work
  2022-04-21 14:17   ` Giovanni Biscuolo
  2022-04-22  5:27     ` Jan Nieuwenhuizen
@ 2022-04-27  9:16     ` Giovanni Biscuolo
  1 sibling, 0 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2022-04-27  9:16 UTC (permalink / raw)
  To: Ryan Prior, 55013

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

Hi Ryan,

Giovanni Biscuolo <g@xelera.eu> writes:

[...]

> 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

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

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

* bug#55013: Guix-emacs doesn't work
  2022-04-18 23:46 bug#55013: Guix-emacs doesn't work Ryan Prior via Bug reports for GNU Guix
  2022-04-21  9:50 ` Giovanni Biscuolo
@ 2023-03-20 19:09 ` Ricardo Wurmus
  2023-03-22  6:51   ` Giovanni Biscuolo
                     ` (2 more replies)
  1 sibling, 3 replies; 21+ messages in thread
From: Ricardo Wurmus @ 2023-03-20 19:09 UTC (permalink / raw)
  To: 55013; +Cc: Giovanni Biscuolo, Ryan Prior, Jan Nieuwenhuizen

Hi,

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

-- 
Ricardo




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

* bug#55013: Guix-emacs doesn't work
  2023-03-20 19:09 ` Ricardo Wurmus
@ 2023-03-22  6:51   ` Giovanni Biscuolo
  2023-03-23 13:32   ` Giovanni Biscuolo
  2023-03-25 21:00   ` Ryan Prior via Bug reports for GNU Guix
  2 siblings, 0 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2023-03-22  6:51 UTC (permalink / raw)
  To: Ricardo Wurmus, 55013; +Cc: Ryan Prior, Jan Nieuwenhuizen

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

Hi,

Ricardo Wurmus <rekado@elephly.net> writes:

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

--8<---------------cut here---------------start------------->8---

Starting Guix REPL ... [2 times]
geiser-repl--wait-for-prompt: No prompt found!

--8<---------------cut here---------------end--------------->8---

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

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

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

* bug#55013: Guix-emacs doesn't work
  2023-03-20 19:09 ` Ricardo Wurmus
  2023-03-22  6:51   ` Giovanni Biscuolo
@ 2023-03-23 13:32   ` Giovanni Biscuolo
  2023-03-23 14:10     ` Giovanni Biscuolo
  2023-03-23 14:11     ` Giovanni Biscuolo
  2023-03-25 21:00   ` Ryan Prior via Bug reports for GNU Guix
  2 siblings, 2 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2023-03-23 13:32 UTC (permalink / raw)
  To: Ricardo Wurmus, 55013; +Cc: Ryan Prior, Jan Nieuwenhuizen

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

Hi,

Ricardo Wurmus <rekado@elephly.net> writes:

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

--8<---------------cut here---------------start------------->8---

Starting Guix REPL ... [2 times]
geiser-repl--wait-for-prompt: No prompt found!

--8<---------------cut here---------------end--------------->8---

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

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

but now it's not working anymore.

If I start emacs in a shell with:

--8<---------------cut here---------------start------------->8---

 guix shell -n emacs-no-x-toolkit emacs-guix -- emacs -q

--8<---------------cut here---------------end--------------->8---

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

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

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

--8<---------------cut here---------------end--------------->8---

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

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

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

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

* bug#55013: Guix-emacs doesn't work
  2023-03-23 13:32   ` Giovanni Biscuolo
@ 2023-03-23 14:10     ` Giovanni Biscuolo
  2023-03-23 14:11     ` Giovanni Biscuolo
  1 sibling, 0 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2023-03-23 14:10 UTC (permalink / raw)
  To: Ricardo Wurmus, 55013; +Cc: Ryan Prior, Jan Nieuwenhuizen

Hi,

Giovanni Biscuolo <g@xelera.eu> writes:

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

(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:

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

this is the backtrace

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix) [1]> 

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

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




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

* bug#55013: Guix-emacs doesn't work
  2023-03-23 13:32   ` Giovanni Biscuolo
  2023-03-23 14:10     ` Giovanni Biscuolo
@ 2023-03-23 14:11     ` Giovanni Biscuolo
  2023-03-23 16:31       ` Ricardo Wurmus
  1 sibling, 1 reply; 21+ messages in thread
From: Giovanni Biscuolo @ 2023-03-23 14:11 UTC (permalink / raw)
  To: Ricardo Wurmus, 55013; +Cc: Ryan Prior, Jan Nieuwenhuizen

Hi,

Giovanni Biscuolo <g@xelera.eu> writes:

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

(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:

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

this is the backtrace

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix) [1]> 

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

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




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

* bug#55013: Guix-emacs doesn't work
  2023-03-23 14:11     ` Giovanni Biscuolo
@ 2023-03-23 16:31       ` Ricardo Wurmus
  2023-03-23 17:06         ` Giovanni Biscuolo
  0 siblings, 1 reply; 21+ messages in thread
From: Ricardo Wurmus @ 2023-03-23 16:31 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: Ryan Prior, 55013, Jan Nieuwenhuizen

Hi Giovanni,

thank you for testing.

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

-- 
Ricardo




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

* bug#55013: Guix-emacs doesn't work
  2023-03-23 16:31       ` Ricardo Wurmus
@ 2023-03-23 17:06         ` Giovanni Biscuolo
  0 siblings, 0 replies; 21+ messages in thread
From: Giovanni Biscuolo @ 2023-03-23 17:06 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ryan Prior, 55013, Jan Nieuwenhuizen

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

Hi Ricardo,

Ricardo Wurmus <rekado@elephly.net> writes:

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

--8<---------------cut here---------------start------------->8---

guix shell --preserve='^DISPLAY$' --preserve="^TERM" --preserve='^XAUTHORITY$' -C emacs-no-x-toolkit emacs-guix -- emacs -q

--8<---------------cut here---------------end--------------->8---

in *Messages* I get:

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

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

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix)>

--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---

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

--8<---------------cut here---------------end--------------->8---

Thanks!  Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

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

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

* bug#55013: Guix-emacs doesn't work
  2023-03-20 19:09 ` Ricardo Wurmus
  2023-03-22  6:51   ` Giovanni Biscuolo
  2023-03-23 13:32   ` Giovanni Biscuolo
@ 2023-03-25 21:00   ` Ryan Prior via Bug reports for GNU Guix
  2023-03-25 22:46     ` Ricardo Wurmus
  2 siblings, 1 reply; 21+ messages in thread
From: Ryan Prior via Bug reports for GNU Guix @ 2023-03-25 21:00 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Giovanni Biscuolo, 55013, Jan Nieuwenhuizen

------- Original Message -------
On Monday, March 20th, 2023 at 7:09 PM, Ricardo Wurmus <rekado@elephly.net> wrote:


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




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

* bug#55013: Guix-emacs doesn't work
  2023-03-25 21:00   ` Ryan Prior via Bug reports for GNU Guix
@ 2023-03-25 22:46     ` Ricardo Wurmus
  2024-11-29 10:38       ` Cayetano Santos via Bug reports for GNU Guix
  0 siblings, 1 reply; 21+ messages in thread
From: Ricardo Wurmus @ 2023-03-25 22:46 UTC (permalink / raw)
  To: Ryan Prior; +Cc: Giovanni Biscuolo, 55013, Jan Nieuwenhuizen


Ryan Prior <rprior@protonmail.com> writes:

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




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

* bug#55013: Guix-emacs doesn't work
  2023-03-25 22:46     ` Ricardo Wurmus
@ 2024-11-29 10:38       ` Cayetano Santos via Bug reports for GNU Guix
  2024-11-29 11:01         ` Cayetano Santos via Bug reports for GNU Guix
  0 siblings, 1 reply; 21+ messages in thread
From: Cayetano Santos via Bug reports for GNU Guix @ 2024-11-29 10:38 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: g, rprior, 55013, janneke


Same for me, and I’m a regular user of guix-emacs.

I manage to reproduce the issue within a container, though, and even
outside with ‘emacs -q -nw’.

I’m really curious about what exactly makes it work within my own
configuration.

--
Cayetano Santos




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

* bug#55013: Guix-emacs doesn't work
  2024-11-29 10:38       ` Cayetano Santos via Bug reports for GNU Guix
@ 2024-11-29 11:01         ` Cayetano Santos via Bug reports for GNU Guix
  2024-11-29 14:55           ` Suhail Singh
  0 siblings, 1 reply; 21+ messages in thread
From: Cayetano Santos via Bug reports for GNU Guix @ 2024-11-29 11:01 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: g, rprior, 55013, janneke


>ven. 29 nov. 2024 at 11:38, Cayetano Santos <csantosb@inventati.org> wrote:

> Same for me, and I’m a regular user of guix-emacs.
>
> I manage to reproduce the issue within a container, though, and even
> outside with ‘emacs -q -nw’.

Not outside, sorry.

> I’m really curious about what exactly makes it work within my own
> configuration.

Ok, I have something:

login shell

mkdir -p ~/.guix-profiles/borrar
guix install -p ~/.guix-profiles/borrar/guix-profile emacs emacs-guix
export GUIX_PROFILE=$HOME/.guix-profiles/$1/guix-profile
. "$GUIX_PROFILE/etc/profile"
emacs -q -nw

Tested:

M-x guix-packages-by-name
M-x guix-installed-packages

No problem here. So the issue is related with the guix shell container,
in my opinion (unless there is something else in my default profile).

Could someone confirm ?

--
Cayetano Santos




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

* bug#55013: Guix-emacs doesn't work
  2024-11-29 11:01         ` Cayetano Santos via Bug reports for GNU Guix
@ 2024-11-29 14:55           ` Suhail Singh
  2024-11-29 15:25             ` Suhail Singh
  0 siblings, 1 reply; 21+ messages in thread
From: Suhail Singh @ 2024-11-29 14:55 UTC (permalink / raw)
  To: 55013; +Cc: g, rprior, csantosb, rekado, janneke

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

> No problem here. So the issue is related with the guix shell container,
> in my opinion (unless there is something else in my default profile).
>
> Could someone confirm ?

M-x guix-packages-by-name works fine in a guix shell container.  I.e., I
am unable to reproduce any issue.  See details below:

#+begin_src example
  $> gx_shell bash-minimal coreutils-minimal emacs emacs-guix guix guile
  [env]$> emacs

  ....

  $> type gx_shell
  gx_shell is a function
  gx_shell ()
  {
      if ob_shell_session_p; then
          local ps12='|PS1|PS2';
      else
          local ps12='';
      fi;
      ps12='|obsh_PS1|obsh_PS2'"${ps12}";
      local preserve='.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS'"${ps12}";
      guix shell --pure -CPWN -E "${preserve}" "${@}"
  }
#+end_src

The output of guix describe is as follows:

#+begin_src example
  guix 0de7842
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 0de78424bd27ec97633401c735e0a766a79b2eee
#+end_src

-- 
Suhail




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

* bug#55013: Guix-emacs doesn't work
  2024-11-29 14:55           ` Suhail Singh
@ 2024-11-29 15:25             ` Suhail Singh
  2024-11-29 20:12               ` Cayetano Santos via Bug reports for GNU Guix
  0 siblings, 1 reply; 21+ messages in thread
From: Suhail Singh @ 2024-11-29 15:25 UTC (permalink / raw)
  To: Suhail Singh; +Cc: g, rprior, csantosb, rekado, 55013, janneke

Suhail Singh <suhailsingh247@gmail.com> writes:

> #+begin_src example
>   $> gx_shell bash-minimal coreutils-minimal emacs emacs-guix guix guile
>   [env]$> emacs
>
>   ....
>
>   $> type gx_shell
>   gx_shell is a function
>   gx_shell ()
>   {
>       if ob_shell_session_p; then
>           local ps12='|PS1|PS2';
>       else
>           local ps12='';
>       fi;
>       ps12='|obsh_PS1|obsh_PS2'"${ps12}";
>       local preserve='.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS'"${ps12}";
>       guix shell --pure -CPWN -E "${preserve}" "${@}"
>   }
> #+end_src

Apologies for missing the reference to undefined functions in the above.
For present purposes, gx_shell can be simplified as follows:

#+begin_src example
  $> type gx_shell
  gx_shell is a function
  gx_shell ()
  {
      local preserve='.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS';
      guix shell --pure -CPWN -E "${preserve}" "${@}"
  }
#+end_src

-- 
Suhail




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

* bug#55013: Guix-emacs doesn't work
  2024-11-29 15:25             ` Suhail Singh
@ 2024-11-29 20:12               ` Cayetano Santos via Bug reports for GNU Guix
  2024-11-29 22:06                 ` Ryan Prior via Bug reports for GNU Guix
  0 siblings, 1 reply; 21+ messages in thread
From: Cayetano Santos via Bug reports for GNU Guix @ 2024-11-29 20:12 UTC (permalink / raw)
  To: Suhail Singh; +Cc: rekado, g, rprior, 55013, janneke


>ven. 29 nov. 2024 at 10:25, Suhail Singh <suhailsingh247@gmail.com> wrote:

> Suhail Singh <suhailsingh247@gmail.com> writes:
>
>> #+begin_src example
>>   $> gx_shell bash-minimal coreutils-minimal emacs emacs-guix guix guile
>>   [env]$> emacs
>>
>>   ....
>>
>>   $> type gx_shell
>>   gx_shell is a function
>>   gx_shell ()
>>   {
>>       if ob_shell_session_p; then
>>           local ps12='|PS1|PS2';
>>       else
>>           local ps12='';
>>       fi;
>>       ps12='|obsh_PS1|obsh_PS2'"${ps12}";
>>       local preserve='.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS'"${ps12}";
>>       guix shell --pure -CPWN -E "${preserve}" "${@}"
>>   }
>> #+end_src
>
> Apologies for missing the reference to undefined functions in the above.
> For present purposes, gx_shell can be simplified as follows:
>
> #+begin_src example
>   $> type gx_shell
>   gx_shell is a function
>   gx_shell ()
>   {
>       local preserve='.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS';
>       guix shell --pure -CPWN -E "${preserve}" "${@}"
>   }
> #+end_src

So  this works:

  guix shell --pure -CPWN emacs emacs-guix guile

with a ‘emacs -q -nw’ followed by a M-x guix-packages-by-name

But this fails:

  guix shell --pure -CPWN emacs emacs-guix

Guile is not propagated in the emacs-guix package definition, is this
the problem ?

--
Cayetano Santos




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

* bug#55013: Guix-emacs doesn't work
  2024-11-29 20:12               ` Cayetano Santos via Bug reports for GNU Guix
@ 2024-11-29 22:06                 ` Ryan Prior via Bug reports for GNU Guix
  0 siblings, 0 replies; 21+ messages in thread
From: Ryan Prior via Bug reports for GNU Guix @ 2024-11-29 22:06 UTC (permalink / raw)
  To: csantosb@inventati.org
  Cc: Ricardo Wurmus, Giovanni Biscuolo, Jan Nieuwenhuizen,
	suhailsingh247@gmail.com, 55013@debbugs.gnu.org

-------- Original Message --------
On 11/29/24 2:12 PM, Cayetano Santos <csantosb@inventati.org> wrote:

>  Guile is not propagated in the emacs-guix package definition, is this
>  the problem ?

Thank you for distilling the issue as such! I would suggest that emacs-guix should explicitly refer to the guile it depends upon in the store, rather than requiring (or propagating) guile in your profile.

Cheers, 
Ryan




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

end of thread, other threads:[~2024-11-29 22:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-18 23:46 bug#55013: Guix-emacs doesn't work Ryan Prior via Bug reports for GNU Guix
2022-04-21  9:50 ` Giovanni Biscuolo
2022-04-21 14:17   ` Giovanni Biscuolo
2022-04-22  5:27     ` Jan Nieuwenhuizen
2022-04-27  9:13       ` Giovanni Biscuolo
2022-04-27  9:16     ` Giovanni Biscuolo
2023-03-20 19:09 ` Ricardo Wurmus
2023-03-22  6:51   ` Giovanni Biscuolo
2023-03-23 13:32   ` Giovanni Biscuolo
2023-03-23 14:10     ` Giovanni Biscuolo
2023-03-23 14:11     ` Giovanni Biscuolo
2023-03-23 16:31       ` Ricardo Wurmus
2023-03-23 17:06         ` Giovanni Biscuolo
2023-03-25 21:00   ` Ryan Prior via Bug reports for GNU Guix
2023-03-25 22:46     ` Ricardo Wurmus
2024-11-29 10:38       ` Cayetano Santos via Bug reports for GNU Guix
2024-11-29 11:01         ` Cayetano Santos via Bug reports for GNU Guix
2024-11-29 14:55           ` Suhail Singh
2024-11-29 15:25             ` Suhail Singh
2024-11-29 20:12               ` Cayetano Santos via Bug reports for GNU Guix
2024-11-29 22:06                 ` Ryan Prior via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

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

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