From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YPsRMCAtS19KRQAA0tVLHw (envelope-from ) for ; Sun, 30 Aug 2020 04:37:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aPZXKyAtS19AdgAAbx9fmQ (envelope-from ) for ; Sun, 30 Aug 2020 04:37:52 +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 37436940877 for ; Sun, 30 Aug 2020 04:37:52 +0000 (UTC) Received: from localhost ([::1]:36698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCF6D-0005p7-Of for larch@yhetil.org; Sun, 30 Aug 2020 00:37:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCF5s-0005oz-4f for emacs-orgmode@gnu.org; Sun, 30 Aug 2020 00:37:28 -0400 Received: from aibo.runbox.com ([91.220.196.211]:44750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCF5p-0007d6-Ly for emacs-orgmode@gnu.org; Sun, 30 Aug 2020 00:37:27 -0400 Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kCF5l-0003sJ-BV; Sun, 30 Aug 2020 06:37:21 +0200 Received: by submission02.runbox with esmtpsa [Authenticated alias (611856)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kCF5e-0002F2-2n; Sun, 30 Aug 2020 06:37:14 +0200 References: <87r1rqled0.fsf@havana> <87k0xifa9h.fsf@gmail.com> <87d03art6a.fsf@havana> <87h7slgbi5.fsf@gmail.com> <352C7149-743F-4944-ACA5-7A1242B5A3AA@health.ucsd.edu> User-agent: mu4e 1.4.3; emacs 26.3 From: Dylan Schwilk To: "Berry\, Charles" Subject: Re: Help debugging R source code block output problem with :session In-reply-to: <352C7149-743F-4944-ACA5-7A1242B5A3AA@health.ucsd.edu> Date: Sat, 29 Aug 2020 23:37:11 -0500 Message-ID: <87d038agw8.fsf@havana> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: permerror client-ip=91.220.196.211; envelope-from=dylan@schwilk.org; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/30 00:18:53 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 , "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -0.51 X-TUID: VWahOuGykUNB Thanks for the workaround idea of grabbing the results as a string. I'm not sure why this issue cropped up for me right now when I did not run into it in previous years. But I have run into other :results output issues in the past when ess changed. Thanks, Dylan On Sat 29 Aug 2020 at 15:35, Berry, Charles wrote: > This problem has been bugging people for years and previous > attempts to solve it have always run up against creating more > problems in the process of solving this one. > > This workaround gives the same results with or without `:session > "NEW"' and same as OPs first src block: > > #+header: :prologue "capture.output({" :epilogue "})" > #+begin_src R :results value verbatim :session "NEW" > print(" ") > print("one three") > print("end") > #+end_src > > If you do decide to dig into solving this, please be sure that > remote sessions and graphical outputs are not broken. > test-ob-R.el does not cover those cases. In fact, it is pretty > short, so there are probably other things that could break > without `make test' complaining. > > HTH, > > Chuck > > >> On Aug 29, 2020, at 12:24 AM, Jack Kamm >> wrote: >> >> Hi Dylan, >> >>> The patch does fix that issue -- but it introduces a different >>> bug >>> for code blocks with ~:session~: the R block now only produces >>> output from the last statement evaluated. >> >> Of course, you're right. Good catch. >> >> Here's another attempt. It fixes the issue by modifying the R >> comint >> regular expression, requiring it to match at the beginning of >> the line. --