From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kHuoFNbFUmGgOQAAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 09:35:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WIJ0ENbFUmEsGwAA1q6Kng (envelope-from ) for ; Tue, 28 Sep 2021 07:35:50 +0000 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 936E92CA02 for ; Tue, 28 Sep 2021 09:35:49 +0200 (CEST) Received: from localhost ([::1]:48198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV7eW-0000SG-L0 for larch@yhetil.org; Tue, 28 Sep 2021 03:35:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV7db-0000RK-P5 for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 03:34:53 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV7dZ-0006Er-L5 for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 03:34:51 -0400 Received: by mail-wr1-x434.google.com with SMTP id t18so56341742wrb.0 for ; Tue, 28 Sep 2021 00:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wRUaOQiO1TunWX7FsXFsKXH0AoZ8r/lVI40611YgySs=; b=CXm40tUXka3PgNsPUAjjh/f9eSVj9nxybU+1tcqqf5ta2D4x7H9JmekoWdLj2VDXWq Ng5z0fwfBNewRfhnKFL3hjCij/+9GpWTAn4p61isURBIQrUNonqYUGpTHfvVB1g3Fnf+ 9SgGMZ+bD7uGAs8mHc8LiyvajgqpU5dFmTOqfUbrI9FAaRXxUNvAjs3ncRfG/0afhDLy QJWxe3Kb0Wu9+P70LMJreQ7RV1mXZJi8U6wI+p67e7ZF975E0sXearh7PHmOzu67FPq0 Ye8HnsCOxlBMdP8HEEziPWFaT1rYuZCp2LwNlqINL+SpfvZdm2s2MdPfQfuJBMmIn/45 uHqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wRUaOQiO1TunWX7FsXFsKXH0AoZ8r/lVI40611YgySs=; b=B8N3QCo9MlKa8LHDUhSi3U3y+Mp1UjVf6nCCWCiPaiULgMU4wRMjZO5hKsl81ixBp6 VarCQOxgl+DEnNzXI9LkdJ3Ln8J9LVTATnLeaNs/g+vxGLVm3EymZ2gbqU6bcZRlG8lf r+qew5ys2xASj+lKIHlvYi2/awrfYhwzt1Tp47BpNVCsE97J6absS9PfEqxJ76u8vjZx 5zK/29XtY6B0mW4Uycav6UBiFIitU5zWEwzkWJOuGe6ZWXfx85PDBDFVotv3fxcXhUbp Jh2CkKA5PSFkpC3bBBfWPpD9FovIcoPlOluKFv1VyBWZQCJiddczSqeSHJPboTwgeBNC 2dww== X-Gm-Message-State: AOAM533rdCwN3OwtwCpnQvgeEWW4c9dFK0ffAbRvQ61h4IM6EHBK3WBW cwdP4iSX3UOg00WR6XD0nVkeFAzXAEVZzlb7 X-Google-Smtp-Source: ABdhPJxMnWPMaPuGMF+IbyjZN9QWVWC0ykaAh0IDM2xbbKsflKHOWccXs54QW6den66YGhAW3DDdfg== X-Received: by 2002:a5d:608e:: with SMTP id w14mr3031628wrt.119.1632814488118; Tue, 28 Sep 2021 00:34:48 -0700 (PDT) Received: from localhost (ip-95-223-72-99.hsi16.unitymediagroup.de. [95.223.72.99]) by smtp.gmail.com with ESMTPSA id d70sm1772487wmd.3.2021.09.28.00.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 00:34:47 -0700 (PDT) From: Jeremie Juste To: "Berry, Charles" Subject: Re: [PATCH] async process in R References: <87zgrzclb5.fsf@debian-BULLSEYE-live-builder-AMD64> <08FCAE37-4D75-4E06-9FA2-7E2939F74709@health.ucsd.edu> <8735ppdapw.fsf@debian-BULLSEYE-live-builder-AMD64> <6BFD70A9-41A8-4E0F-8022-E6355BF4250A@health.ucsd.edu> Date: Tue, 28 Sep 2021 09:34:43 +0200 In-Reply-To: (Charles Berry's message of "Mon, 27 Sep 2021 23:40:24 +0000") Message-ID: <87h7e5b1bg.fsf@debian-BULLSEYE-live-builder-AMD64> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=jeremiejuste@gmail.com; helo=mail-wr1-x434.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jack Kamm , Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632814549; 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=wRUaOQiO1TunWX7FsXFsKXH0AoZ8r/lVI40611YgySs=; b=Jv80K9UOGxN7rrjBDLhZir67PGLWpIUmmxBtZckpC9vvPJ83kvTqq7hnb2ES6lAFUuKTFc uluDtDFvK2Ja52nE54j99/Tsil7B6lpxMcxDgEG25CIEF1fUbSs5tnl7PdzTIus8ga5p79 nLd78GYhw2+iR/4FHrp1v7Qv22Ndoxw2p2sFOA1a2FoMk9GwPxtG0SqMO0s+4TyzvncFa6 JK75cAs7YnWtK+KZWPWnzW1GdjbA02/6pSBGH9nSeK3ukxlVLjSXRqpYKiRUUy4U6a5vIY ZMC5bzWd5pvAPfCaj9XJC7wgpuCvVwQ6gOZ0Qj5UFn/ltmEPHJ7ES4zq8gWbxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632814549; a=rsa-sha256; cv=none; b=TsEi1khj6Oo+5ikgcoDDjAqx5Ib/ZeZhbvIJHp2glKmvBc9bekseT/wqcKQlxMF45LK+hP laNBlO76Mcru6NLSH6nU/6XLFQSRk5Afcjcn6lIAXg/gwU8+Foi/m+Shq6+tUlWfw7Ncr/ 1qfPfxXDyAqADPdZa6k1NMLmLE4xBfG20EgW8V6dxD7Z4dx+tKOXwpEC1uD0XxF5u2ZAxg YK1yVvlYTni8Hcpf637zuHXYi/bJq9Y7hHgfyfJyMHye9YRNsYWqTfZFMnue0bgxtY7S8N QxxqozyW1gUogLHdJWD28YfUGQ8e0tLx4OpxveT6HhNQJ0NR5/sKnj4GS0wOCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CXm40tUX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CXm40tUX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 936E92CA02 X-Spam-Score: -0.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: B47KZafZC25d --=-=-= Content-Type: text/plain Hello Chuck, On Monday, 27 Sep 2021 at 23:40, Berry, Charles wrote: > Jeremie, > >> On Sep 27, 2021, at 3:56 PM, Berry, Charles wrote: >> >> There is something in my init that doesn't play nice with this. > > (setq ess-inject-source nil) Thanks for the feedback. With the following patch, I made sure that ess-inject-source is set to default before evaluating the buffer. So even if I set (setq ess-inject-source 'function-and-buffer), I get the following output. Note that I get the same output in the IESS console buffer when I execute the command following command. #+begin_src R :session *R* :results output :async yes Sys.sleep(2) 1:5 10:20 1:2 #+end_src #+RESULTS: : [1] 1 2 3 4 5 : [1] 10 11 12 13 14 15 16 17 18 19 20 : [1] 1 2 It might be good to fix this on the ESS side. I'll see what can be done, but I'd appreciate any input you might have on this. Thanks again. Best regards, Jeremie --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-ob-R.el-Patch-async-evaluation-when-results-output.patch Content-Description: patch3 >From db2ad631247a5c52d9d6f6779948f6d0cf34c698 Mon Sep 17 00:00:00 2001 From: Jeremie Juste Date: Tue, 28 Sep 2021 09:04:25 +0200 Subject: [PATCH] ob-R.el: Patch async evaluation when :results output * lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session): Make sure that `ess-inject-source' is set to the default 'function-and-buffer before running (ess-eval-buffer). Return `ess-inject-source' to its user-specified state afterwards. --- lisp/ob-R.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 188b9ac8f..7e050c094 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -528,9 +528,13 @@ by `org-babel-comint-async-filter'." (insert (format ob-session-async-R-indicator "end" uuid)) (setq tmp ess-eval-visibly) + (setq user-inject-src-param ess-inject-source) (setq ess-eval-visibly nil) + (setq ess-inject-source 'function-and-buffer) (ess-eval-buffer nil)) - (setq ess-eval-visibly tmp) + (setq ess-eval-visibly tmp) + (setq ess-inject-source user-inject-src-param) + uuid)))) (defun ob-session-async-R-value-callback (params tmp-file) -- 2.30.2 --=-=-=--