From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uE5tJ1k4hGb3LwEAe85BDQ:P1 (envelope-from ) for ; Tue, 02 Jul 2024 17:26:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uE5tJ1k4hGb3LwEAe85BDQ (envelope-from ) for ; Tue, 02 Jul 2024 19:26:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=crawf.uk header.s=fe-7a9b4d699b header.b=w0TipzT8; dmarc=pass (policy=reject) header.from=crawf.uk; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719941209; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lBdZWlEQkQIyDRKrgniaoO0Sh+c4DyT3q2hwtzk1kao=; b=KeJ579y2uNJco2laoL9VzlDVLbg4504Bm3Q9XO0rRefhvW7a2XrZqvczP7oOfEZXFD22fe LnKxYd9gvYX8Pm4/QpMDPEydVzExVMZNZ9cqAjNcgFCPC8F4A1Am8Ebc1cdkVWkOaC4S0b o3dXhMl5iMhzVr7QSxOKozxh4xa6aPTxlFAs0FYsmMJl8sahkUgGCA6fQcS5L4YIWUsbt+ Xo9unlvTK9gh4z8M6qnIKZny+rT2QmCKpm3rU21EG0z8YImhTg7O7GH/lzQK1Hn6MTeT1Z ixEz+ucmB27JLgc4IyW7jS25VJraCRuhmxxIGQ7HGPY2BI02H3fpSNujOhjBQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719941209; a=rsa-sha256; cv=none; b=rNlVEGgBSl0CrOS6nvAEVI0qA53NVLvdKtYhMxxRpYQVuamyfSRDF1Zm/eTH2x72ch7drB obkbNt9FK6vUtt15c476r/ndO0xg4OiiVfLDpTy+VQHuRI53lMfhlxpGJxfSo1AbNBZapA 6tr+G5HmZkyVuj0Jw+/bqHOmR1N7gI0cy6zrYaQcSYmtByFIwrWRv1hw9wM5BY48Xe82s8 P1ElJUIfxkPxChyVBN15yimojW0fTBKmdgKlM+WFsu01j3cRkPAEfTaS0zivScQT92pdpZ Ebj75JZZo3hEZd7nAmL9J8glTkCwPEccTGOXmhBY1sPIVlDnXGgySMRC9mg2Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=crawf.uk header.s=fe-7a9b4d699b header.b=w0TipzT8; dmarc=pass (policy=reject) header.from=crawf.uk; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" 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 6E61C60225 for ; Tue, 2 Jul 2024 19:26:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOey3-0006WW-Ag; Tue, 02 Jul 2024 10:58:51 -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 1sOey1-0006Uy-UM for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 10:58:50 -0400 Received: from smtp.forwardemail.net ([167.172.40.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOey0-0006or-5v for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 10:58:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawf.uk; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: From: References: Cc: To: Subject: MIME-Version: Date: Message-ID; q=dns/txt; s=fe-7a9b4d699b; t=1719932318; bh=lBdZWlEQkQIyDRKrgniaoO0Sh+c4DyT3q2hwtzk1kao=; b=w0TipzT8o4ODVFGen0khYlMPXJlzEYOX63+FhTAv3ugyi6e5m9MBBN6He+Nj/4OC82ljI3a7b kMF3CiYm6x4RGSpDJjQFYMVTE2Sx018uhxjxjZ4izjZms3eRI5wMxuxMVE89cpEFZaCDb1EEP7T QCTF5uPrBtuby5uYr7HMi3w= Message-ID: <7eff7254-5917-4619-9239-6468c4c0aaa8@crawf.uk> Date: Tue, 2 Jul 2024 15:58:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Org babel R command session To: Ihor Radchenko Cc: "emacs-orgmode@gnu.org (emacs-orgmode@gnu.org)" References: <20240702104618.Horde.21-qZi8i7lde_pU0hv8MY6F@drive.crawf.uk> <87plrvj1yq.fsf@localhost> Content-Language: en-US From: Sam Crawford In-Reply-To: <87plrvj1yq.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; sam@crawf.uk, smtp.forwardemail.net, 167.172.40.54 X-ForwardEmail-ID: 6684159bae73da3e2204aac6 Received-SPF: pass client-ip=167.172.40.54; envelope-from=SRS0=7e9a=OD=crawf.uk=sam@fe-bounces.crawf.uk; helo=smtp.forwardemail.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 6E61C60225 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.86 X-Spam-Score: -9.86 X-TUID: JKJiduDEGGFY On 02/07/2024 15:35, Ihor Radchenko wrote: > Sam writes: > >> I just noticed an inconsistency between the way ob-R and ob-python >> select executables. For python, there are 3 variables: >> org-babel-python-command, org-babel-python-command-session and >> org-babel-python-command-nonsession, with the former overriding the >> latter two. > > This was added because it is relatively common to use different commands > for session and non-session python blocks (things like ipython > vs. python). > >> For R, there is only org-babel-R-command, which is ignored when running >> as a session. >> >> Is it worth trying to make the R functionality as similar as possible to >> the python? If so then I'm happy to submit a patch doing just >> that. However, I'm not sure what is the best way to handle giving >> command-line arguments to the R interpreter when initialising a session, >> because you need to set inferior-ess-program to the executable >> specifically, and put any arguments in inferior-R-args. > > The question is whether it is practically useful to have separate > commands for R session and R non-session blocks. For most interpreters, > it is not very useful - they use the same command. > I agree that it's unlikely that users will want separate commands (though tools like radian do exist). Regardless, there is still the issue that, if :session is not none, then babel will ignore org-babel-R-command, as it just makes a call to run-ess-R. So even if you don't want to add more variables (which ultimately I'd agree with), it might still be worth wrapping that call in something like (let ((inferior-ess-R-program (or org-babel-R-command inferior-ess-R-program))) ...)