From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QPGNNrz2oWTmcAEASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 00:14:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uGyLNrz2oWSBEgEAauVa8A (envelope-from ) for ; Mon, 03 Jul 2023 00:14:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6082DB659 for ; Mon, 3 Jul 2023 00:14:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qG5KH-0005Ha-GI; Sun, 02 Jul 2023 18:13:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qG5KG-0005HQ-0F for help-guix@gnu.org; Sun, 02 Jul 2023 18:13:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qG5KD-0004Pc-NT for help-guix@gnu.org; Sun, 02 Jul 2023 18:13:47 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A1BDB240101 for ; Mon, 3 Jul 2023 00:13:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688336022; bh=t2+mYJpAK/Nv32SnSKL2Ov0qN8u116+iRe6E5rpQzTg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=j35hG8dzP+LyWJHNnGa3imIN3xP8YHFmvE+CQtPBl5wvRkJnMef61ip6rDbDfoOqp GZGbHHl0J/hFB+inIu6EzxFE/dKGvcIZvaiOGFJ6Rs/cbnTfng5pB3yHxtGcB7q3rU Mu7RZMeF/Io5rCECzI2A14X/V7ZXkhurPwldEYcJPnlfaA5ALTaw2Euhzce9bc8Su1 S/7fKH0beLhEtq+PaURRpsXLb2NZdPuCmJGvKB1r6Qhu/H+Vz42ZaqyTsbMgCQkVVF maurmFZUtd5TMZeIOcN2Kvu4YYpTE5HpreJMTFmHJuJBW0gO/28+afxS7kRVCh3WtV LqjrF/8jCDdgQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QvNcP2ltqz9rxG; Mon, 3 Jul 2023 00:13:41 +0200 (CEST) References: <87lefy2ne6.fsf@posteo.net> <87ttumdt63.fsf@rdklein.fr> From: Kyle Andrews To: Edouard Klein Cc: help-guix@gnu.org Subject: Re: guix shell readline issue with R Date: Sun, 02 Jul 2023 20:53:10 +0000 In-reply-to: <87ttumdt63.fsf@rdklein.fr> Message-ID: <87h6qmt10t.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=kyle@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688336060; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2Jy0wrLb+4oODrXVM6QWJsDqnh3y6H5MA9Ns84Aud5I=; b=MZin8RCEKE3HTETp/vhb3+dNKAwVYofYDcVuNZ+Y160dkavF62uvtitqTDM/+AmDHkwvyI 1VILwEr0lyCe1NnAg9GdoUMIgsQ0FGROPPtJl+jLi6EyLSn7vkha7Xa+oMANUtJVv7LfjU Rs4yHLpFVOTfheVJ0xHsi+Hlbfr3gF44ea9f5FhNeP5G3nuOfFL4emgtYKFAM/nItMwvr/ 7fmfbnV431Jt6/rJZ5doQeI0KAkxxfocMxs2SQ19UT9+UZOrdhwFUBp9j/L6zypHCoB6fO 0Byq+4bqyvOpZbm4ji9V0eaD6eFbkO2ALS52Me1ojcN6WF72a8s/vXSNJINZWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=j35hG8dz; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688336060; a=rsa-sha256; cv=none; b=k4ONj7I8W8iu/sbnlRBw3u5w7nbtVODSbeQEabkhZAJ2CNC6/WF1QA/3Sxu7ymLakjosL5 2nmY/lQrQPIqygMcvyMh0cklm4aHN4iOHHEWc/UBHbJjvyvbND8yRABzgn8M0Uo3pwd3jc os6/jmuCVAHjFHH3gjv86bwxdFSqOus634rsJWc+kJX+E79ld4OJZm/QD3xe8M3m4omyzG CmLJt/RQtY+OQBY28+fYHBE6qArL8NV4MlWgdxLz1stQLTcT5SKqubcBRqF4Ug6zMZd3o/ HoC8pZ4gz+DEWrpHNpGRo3P6Qq4dSLXl7PfVhKexeQvQouv6WSZsSI89P2RERw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=j35hG8dz; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6082DB659 X-Spam-Score: -6.73 X-TUID: YiZchAWbxcIE Edouard Klein 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 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