all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kyle Andrews <kyle@posteo.net>
To: Edouard Klein <edou@rdklein.fr>
Cc: help-guix@gnu.org
Subject: Re: guix shell readline issue with R
Date: Sun, 02 Jul 2023 20:53:10 +0000	[thread overview]
Message-ID: <87h6qmt10t.fsf@posteo.net> (raw)
In-Reply-To: <87ttumdt63.fsf@rdklein.fr>


Edouard Klein <edou@rdklein.fr> writes:

> Hi Kyle,
>
>
> Running
> guix shell r
>
> and then
> R
>
> will get you the C-c handling you want.
>
> There is indeed readline support with guix shell r -- R:
> up arrow to get history, c-E, c-A for end of line, start if line, etc.
>
> I think maybe the problem lies not with readline but with the way
> signals are handled. I can't seem to understand exactly how, but I would
> look into that direction.
>
> Cheers,
>
> Edouard.

Thanks Edouard for pointing out that the problem is signals-related and not readline related.

I spent a little time refreshing my memory about signals, looking at the following shell scripting references.

=> https://linuxcommand.org/lc3_wss0150.php
=> https://mywiki.wooledge.org/SignalTrap

I tried using tools like trap, wait, and exec, but haven't yet found an approach that worked.

I placed a basic R manifest here if anyone would like to try:

=> https://paste.debian.net/1284782/

Basically my shell script was:

```
#!/bin/sh
guix shell -m /tmp/manifest.scm -- R --no-save --quiet --no-restore
```

In the R REPL I interactively test the problem with:

```
while(TRUE) Sys.sleep(1)
  C-c C-c
```

Cheers,
Kyle

> Kyle Andrews <kyle@posteo.net> writes:
>
>> Dear Guix,
>>
>> When I run `guix install r` and then start an R process I get a readline-enabled
>> REPL where I can abort commands with C-c C-c while keeping the process alive
>> afterwards. When I run R from `guix shell r -- R` I don't get any readline
>> support in R. Pressing C-c immediately aborts the process. This is inconvenient
>> for interactive exploration. Is there a way to make guix shell work the same way
>> as if the R command was installed into a profile?
>>
>> Thanks for your help,
>> Kyle



  reply	other threads:[~2023-07-02 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-02 17:57 guix shell readline issue with R Kyle Andrews
2023-07-02 19:09 ` Edouard Klein
2023-07-02 20:53   ` Kyle Andrews [this message]
2023-07-02 22:14   ` Kyle Andrews
2023-07-03  7:58     ` Edouard Klein
2023-07-03 21:55       ` Kyle Andrews
2023-07-04 12:27         ` Edouard Klein
2023-08-23 14:56 ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6qmt10t.fsf@posteo.net \
    --to=kyle@posteo.net \
    --cc=edou@rdklein.fr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

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