From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EHnCDqcpUmEwowAAgWs5BA (envelope-from ) for ; Mon, 27 Sep 2021 22:29:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WPBcCqcpUmEeHgAAB5/wlQ (envelope-from ) for ; Mon, 27 Sep 2021 20:29:27 +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 BDD992C929 for ; Mon, 27 Sep 2021 22:29:26 +0200 (CEST) Received: from localhost ([::1]:43906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUxFd-0003xm-Tb for larch@yhetil.org; Mon, 27 Sep 2021 16:29:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUxF4-0003xa-UF for emacs-orgmode@gnu.org; Mon, 27 Sep 2021 16:28:52 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:55128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUxF3-0007yz-7s for emacs-orgmode@gnu.org; Mon, 27 Sep 2021 16:28:50 -0400 Received: by mail-wm1-x333.google.com with SMTP id s24so1536318wmh.4 for ; Mon, 27 Sep 2021 13:28:48 -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=0E5+mTODwzDhHJYQwCzwwSGzqjpXJzBn5/Zymi8VR+U=; b=Hz5MgG/4OIrS+sNWmwLCUfOeDGLCiJkhm/Pfl68NZJEt9CO+pIncFgvSLdvBBHrKcB EG5k1LoFmKOByKKC5VsbfP9tZ8xUFXTh+klAxJyh/PiNh1kVn0GGGj8mX19BxZvb0ObJ Aj3xl1yBRppM1hDLK2GcSiLtynlA9B21PtruBWbBwa2MA7KpsYaLFEhtxejEoBtoKevF Uj7h5Oe8s7uE2PZ/kQJ/g2q6aS82PHtJpJz2eZGeHwYqqaYWehryzGkk/7iqIrPBEODk 8X5huEnr0vQdzkYhZZWv0u4TXYsl7Z1eYBbgpapY5zIAFkzKQUyIgEB3M9JOmBytz00m DYGA== 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=0E5+mTODwzDhHJYQwCzwwSGzqjpXJzBn5/Zymi8VR+U=; b=zpUT5fe0GrfqgrHm/UvPo9iIkJ6q59GhaK3oKaYiCCnVilHAOsRM3KvssBaP3VH8Lh RkvQclLmbWqC88xhFiiLC1cjDtR7E+KiKmF4pfuY2mIar48mFLG0a2crkN0uVsWVK+Bh wZ0v22Or/7UW8qJeljKNSAUSQhasaNotTlM+/igtjs9cGF5H234XKpzKTC8SXN2msvtr pRc4FUDfIE53x1EhLCy642ifpJWG/qoOXez9aHkDwTmcEEevReHG2N8G+TSy8++rLSi/ klDxpw0KyitI6CDpTjxgWX7Lf8xzaWBAcLhx4zLr7AZYb+0A/SdPQVKU8hLDRh+3TdaY UuQQ== X-Gm-Message-State: AOAM530KIBX0mt7X396L0ADfO/LlF/QZ3FQG8lbvu8XkP6iDE8TUhIL1 2UxEZmNflWkVa8dTEI6KRHo= X-Google-Smtp-Source: ABdhPJz6uQ9nU5FTiV1ztd7rW1X30Zq7RiB8A/seRSuJFBKtt+R1ia8nJ6/csLKj8n5mjMlI8s2SUA== X-Received: by 2002:a7b:cc8d:: with SMTP id p13mr1043706wma.10.1632774527719; Mon, 27 Sep 2021 13:28:47 -0700 (PDT) Received: from localhost (ip-95-223-72-99.hsi16.unitymediagroup.de. [95.223.72.99]) by smtp.gmail.com with ESMTPSA id e2sm17693679wra.40.2021.09.27.13.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 13:28: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> Date: Mon, 27 Sep 2021 22:28:43 +0200 In-Reply-To: <08FCAE37-4D75-4E06-9FA2-7E2939F74709@health.ucsd.edu> (Charles Berry's message of "Mon, 27 Sep 2021 18:28:33 +0000") Message-ID: <8735ppdapw.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::333; envelope-from=jeremiejuste@gmail.com; helo=mail-wm1-x333.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=1632774566; 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=0E5+mTODwzDhHJYQwCzwwSGzqjpXJzBn5/Zymi8VR+U=; b=DJMEjZnk9yXNE24DYrNsx/D7sDTJa3EvjknUh83g4LoGZC/LFMSP6MILAchKdck/L1EZS3 3W3HyulUevLyZSFUq10/F3vGzvEeAR6qBbISQd5O5m+g1Hzr9dNKxqZM/atnyJtFj84B5Q J9CfxSLRPEh9eu0r9OuPmrb72nU0oaCjSPbmuLJnYPWimiVZINz8WocII6a9LyX1MtVjY5 HpEyXi5kX9l/vQZWtkem5Bjvt0uyJfJcvzz+1m5V2ssU9NM8aplLfMrvwSGw3Gdb3tBihO ucnmt3WHF5eT2pJf5b/7tz4sZJHNeZcDG7eXIulLZf9UvoIgeczp79x2rMEI4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632774566; a=rsa-sha256; cv=none; b=RRnq33c9x2DzKVtXrm1Mlf+RBPdynxvi8eB0BCidAsmCj6bSenW0uBYyKX3IaF4EOcIorz QzI7r1Ai4BxLSTxumeX5TLxtxi01g+Lszsju+xs5si4nKTxfCqlQhwVCg7Cq5QIbSUr32l 0FJndXAC+Qfkf0b68o28EWtlw1dB7tXEQp2nXW3Owg82d1HGKTRNChfLOSxmSxYuQWSkhW vm3P1LZzc67meWLJ9Qj2wEr7l+he51oxyteWLsUYds95vZjhpwlsMxK/xBFmSMBeppE0Kr gol8ft5YDEeON67nJKwjpBeDIrMvC3BztGB0E2z9G/qNkLNQ8/UNDq4TWfx/Sg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="Hz5MgG/4"; 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="Hz5MgG/4"; 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: BDD992C929 X-Spam-Score: -0.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: eWTHoioE4KBo --=-=-= Content-Type: text/plain Hello Chuck, On Monday, 27 Sep 2021 at 18:28, Berry, Charles wrote: > > It looks like you have `(setq ess-eval-visibly t)' here. I think that is a default setting. Thanks again for your suggestion. The following patch to be applied on top of the previous one, solves the issue. #+begin_src R :session *R* :results output :async yes Sys.sleep(5) 1:5 #+end_src #+RESULTS: : [1] 1 2 3 4 5 The function (ess-eval-buffer), when the parameter VIS is nil, misled me in the sense that it inverses the value of ess-eval-visibly. Note as well that all the tests in test-ob-R.el passed including the tests for async evaluation from [1] ob-session-async. [1]: https://github.com/jackkamm/ob-session-async/. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-ob-R.el-Patch-async-evaluation-when-results-output.patch Content-Description: patch-2 >From 795cc0ebe637aa4ff148c495cf5403ba2baec242 Mon Sep 17 00:00:00 2001 From: Jeremie Juste Date: Mon, 27 Sep 2021 22:02:17 +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-eval-visibly' is nil before evaluating the temporary buffer, but return ess-eval-visibly to it's original state afterwards. --- lisp/ob-R.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 299ccdf1d..188b9ac8f 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -526,8 +526,11 @@ by `org-babel-comint-async-filter'." (insert body) (insert "\n") (insert (format ob-session-async-R-indicator - "end" uuid)) + "end" uuid)) + (setq tmp ess-eval-visibly) + (setq ess-eval-visibly nil) (ess-eval-buffer nil)) + (setq ess-eval-visibly tmp) uuid)))) (defun ob-session-async-R-value-callback (params tmp-file) -- 2.30.2 --=-=-= Content-Type: text/plain Thanks again to Jack for this useful feature. Best regards, Jeremie --=-=-=--