unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* geiser and guix repl
       [not found] <87sfhmnu8k.fsf.ref@yahoo.com.br>
@ 2022-12-11  9:51 ` Antonio Carlos Padoan Junior
  2022-12-11 11:39   ` Antonio Carlos Padoan Junior
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-11  9:51 UTC (permalink / raw)
  To: guix-devel

Hello,

I'm facing some trouble using guix repl and geiser with company-mode
enabled. Emacs is hanging. I saw in documentation that the issue is
probably the regex used to parse the prompt.

However, the default prompt regex looks fine. The only difference I
noticed between a geiser's session working correctly (started from
emacs) and guix's session (started from terminal + geiser-connect) is
the prompt colors. Guix's guile repl prompt is colored. I'm wondering if
colors are affecting the regex somehow.

Anyone else is facing the same issue? Any clues to fix it? I would like
to have company-mode working correctly.

Best regards,

-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


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

* Re: geiser and guix repl
  2022-12-11  9:51 ` geiser and guix repl Antonio Carlos Padoan Junior
@ 2022-12-11 11:39   ` Antonio Carlos Padoan Junior
  2022-12-12  1:38     ` Mekeor Melire
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-11 11:39 UTC (permalink / raw)
  To: guix-devel

I figure out that the issue was indeed the colors.

I had an .guile file forcing it to use colors.


Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> writes:

> Hello,
>
> I'm facing some trouble using guix repl and geiser with company-mode
> enabled. Emacs is hanging. I saw in documentation that the issue is
> probably the regex used to parse the prompt.
>
> However, the default prompt regex looks fine. The only difference I
> noticed between a geiser's session working correctly (started from
> emacs) and guix's session (started from terminal + geiser-connect) is
> the prompt colors. Guix's guile repl prompt is colored. I'm wondering if
> colors are affecting the regex somehow.
>
> Anyone else is facing the same issue? Any clues to fix it? I would like
> to have company-mode working correctly.
>
> Best regards,

-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


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

* Re: geiser and guix repl
  2022-12-11 11:39   ` Antonio Carlos Padoan Junior
@ 2022-12-12  1:38     ` Mekeor Melire
  2022-12-12 10:28       ` Antonio Carlos Padoan Junior
  0 siblings, 1 reply; 6+ messages in thread
From: Mekeor Melire @ 2022-12-12  1:38 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: guix-devel

2022-12-11 12:39 acpadoanjr@yahoo.com.br:

> I figure out that the issue was indeed the colors.
>
> I had an .guile file forcing it to use colors.

Ah, I guess that's why Guix System ships with the following 
~/.guile file. At least that's where I think I got it from, if I 
remember correctly.

--8<---------------cut here---------------start------------->8---
(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
       =>
       (lambda (module)
         ;; Enable completion and input history at the REPL.
         ((module-ref module 'activate-readline))))
      (else
       (display "Consider installing the 'guile-readline' package 
       for
convenient interactive line editing and input history.\n\n")))

      (unless (getenv "INSIDE_EMACS")
        (cond ((false-if-exception (resolve-interface '(ice-9 
        colorized)))
               =>
               (lambda (module)
                 ;; Enable completion and input history at the 
                 REPL.
                 ((module-ref module 'activate-colorized))))
              (else
               (display "Consider installing the 'guile-colorized' 
               package
for a colorful Guile experience.\n\n"))))
--8<---------------cut here---------------end--------------->8---

> Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> writes:
>
> > I'm facing some trouble using guix repl and geiser with 
> > company-mode enabled. Emacs is hanging. I saw in documentation 
> > that the issue is probably the regex used to parse the prompt.
> >
> > However, the default prompt regex looks fine. The only 
> > difference I noticed between a geiser's session working 
> > correctly (started from emacs) and guix's session (started 
> > from terminal + geiser-connect) is the prompt colors.

By the way, personally, starting "guix repl --listen=tcp:37146" 
from terminal and then running M-x geiser-connect makes Emacs 
freeze for me. Do you experience the same?


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

* Re: geiser and guix repl
  2022-12-12  1:38     ` Mekeor Melire
@ 2022-12-12 10:28       ` Antonio Carlos Padoan Junior
  2022-12-12 13:17         ` Luis Felipe
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-12 10:28 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: guix-devel

Mekeor Melire <mekeor@posteo.de> writes:

>
> By the way, personally, starting "guix repl --listen=tcp:37146" 
> from terminal and then running M-x geiser-connect makes Emacs 
> freeze for me. Do you experience the same?
>

Yes, that was exactly my issue.

The .guile file that you mentioned, the one provided automatically by
Guix system (I was not aware of it), was responsible for the problem at
the end. This script provide colors and other utilities when using guile
from a terminal. If you connect to the guile session using geiser, you
have a session in emacs with a colored prompt as well (it is necessary
to use C-g to escape the hang). The colors in prompt are not properly parsed
by geiser, I think so.

I deleted my .guix file and tried again. Everything was fine.

Now that I learned that .guix file was automatically created (and it was not
something I eventually created myself), I think this issue is something
that should be documented/clarified somewhere or improved.

I will try to launch guix repl from a eshell and check if the .guile
script recognizes that the color should be disabled.

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


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

* Re: geiser and guix repl
  2022-12-12 10:28       ` Antonio Carlos Padoan Junior
@ 2022-12-12 13:17         ` Luis Felipe
  2022-12-12 13:28           ` Mekeor Melire
  0 siblings, 1 reply; 6+ messages in thread
From: Luis Felipe @ 2022-12-12 13:17 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: Mekeor Melire, guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1392 bytes --]

Hi,

On Monday, December 12th, 2022 at 10:28, Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> wrote:

> Mekeor Melire mekeor@posteo.de writes:
> 

> > By the way, personally, starting "guix repl --listen=tcp:37146"
> > from terminal and then running M-x geiser-connect makes Emacs
> > freeze for me. Do you experience the same?
> 

> Yes, that was exactly my issue.
> 

> The .guile file that you mentioned, the one provided automatically by
> Guix system (I was not aware of it), was responsible for the problem at
> the end. This script provide colors and other utilities when using guile
> from a terminal. If you connect to the guile session using geiser, you
> have a session in emacs with a colored prompt as well (it is necessary
> to use C-g to escape the hang). The colors in prompt are not properly parsed
> by geiser, I think so.
> 

> I deleted my .guix file and tried again. Everything was fine.
> 

> Now that I learned that .guix file was automatically created (and it was not
> something I eventually created myself), I think this issue is something
> that should be documented/clarified somewhere or improved.

There's this bug report which seems to be related:

Connecting Geiser to Guile listening to a socket: No prompt found! (.guile to blame)
https://issues.guix.gnu.org/35727.

I still can reproduce it on Guix System f0ee77a.

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

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

* Re: geiser and guix repl
  2022-12-12 13:17         ` Luis Felipe
@ 2022-12-12 13:28           ` Mekeor Melire
  0 siblings, 0 replies; 6+ messages in thread
From: Mekeor Melire @ 2022-12-12 13:28 UTC (permalink / raw)
  To: Luis Felipe; +Cc: Antonio Carlos Padoan Junior, guix-devel

2022-12-12 13:17 luis.felipe.la@protonmail.com:

> There's this bug report which seems to be related:
>
> Connecting Geiser to Guile listening to a socket: No prompt 
> found! (.guile to blame) https://issues.guix.gnu.org/35727.

Yes, thank you. I also think that's exactly this bug. Let's 
continue discussion in that thread!


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

end of thread, other threads:[~2022-12-12 13:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87sfhmnu8k.fsf.ref@yahoo.com.br>
2022-12-11  9:51 ` geiser and guix repl Antonio Carlos Padoan Junior
2022-12-11 11:39   ` Antonio Carlos Padoan Junior
2022-12-12  1:38     ` Mekeor Melire
2022-12-12 10:28       ` Antonio Carlos Padoan Junior
2022-12-12 13:17         ` Luis Felipe
2022-12-12 13:28           ` Mekeor Melire

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