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 kFTtFCVwVl/oAQAA0tVLHw (envelope-from ) for ; Mon, 07 Sep 2020 17:38:45 +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 uDjRECVwVl+jWgAAbx9fmQ (envelope-from ) for ; Mon, 07 Sep 2020 17:38:45 +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 50AE89404C5 for ; Mon, 7 Sep 2020 17:38:44 +0000 (UTC) Received: from localhost ([::1]:41346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFL6J-00034L-9T for larch@yhetil.org; Mon, 07 Sep 2020 13:38:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFL5b-0002v4-72 for emacs-orgmode@gnu.org; Mon, 07 Sep 2020 13:37:59 -0400 Received: from mx0a-00395d01.pphosted.com ([148.163.133.170]:14168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFL5Y-0007Mi-Ey for emacs-orgmode@gnu.org; Mon, 07 Sep 2020 13:37:58 -0400 Received: from pps.filterd (m0173168.ppops.net [127.0.0.1]) by mx0a-00395d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 087Han3C032749; Mon, 7 Sep 2020 10:37:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsd.edu; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=campus; bh=kB2McJYUwr1Q5U0Xcx9/RvCUpIxeRr33wZvjQJiec+g=; b=DKQ0mM+wf1L2zdp+P6ozzZD4y2tDAnjesSJQ5pMpdl5vvMCgS6h1L8gDPAINT2rFBBim 5qhRdlcA85+zJSPiY13efw6TNiUZN/sYZHKo/MYnuF3TQANKOhwJupe5af0jdzrAOKRR UXKNmWhyRE0N9ig+wSzQJve/8Ui9MMrsW1EwgOFT4w9NxkJwzinCN/NKeLz/tTh1hgRI BQNrvLO1FJa+YTs3yL6ZVGi3ybK5ZIm7NdXh0XKBzZhMrS1+7QftxHuNqhnFmlW0jFnh jABb1gJ/hDed5EOpxYjzGsIo+T3toBoGAJogD/S946aUcjfsO2FWI9jLaL9UjmG0qzei Xw== Received: from secdlpezp03.ucsd.edu ([40.112.251.180]) by mx0a-00395d01.pphosted.com with ESMTP id 33d3kf0xfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Sep 2020 10:37:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lCJFjSS1N+cfGgz2oipZbe+MKuUvxiJlE63ePxvMtR+jGwpHBcO0lCZOPuImm4fDa+je3BNccr83H7aHDc41V6H0o05ccmNmXpPRwrWCqqAUvToODINrivmEYCrrF2emhiFAWbDRnhGNr/bkpJuHYJNXR5RfUIsS1/zlRGJeJqwQg/1Gk7Bdqa2ar7is4TffyfmfUPVw88o01R9eX1rl79pv586KydmceQQjSe7LvAkr+E3B7BklsHvzy5UgzyGMHimKMqRY+/HDpSOCPp9m8hLiButEe+Zt7SWmrLuqCpXjfTirph201+167Or+QXnVZA+9JJOsUuE8pU8JofWipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kB2McJYUwr1Q5U0Xcx9/RvCUpIxeRr33wZvjQJiec+g=; b=B3rjuCvLbYnZRocDoEOtbXi9Ahk9N/+/I4DP8TsQTp5EXNgSesIgm2qtQKvxlmbCKw1OhuOljjhAfZJhx/6emoiS6BMGPp63jsM6BvB5124FC74Q4qXIeFdT5wBuZDcJdcKYsYqWbsktarOGaTp+GSDL/iw6R67U+bRgf514Z9SFicyqOg0CL8nQ8CDSSuqun6LaX5atlpsbKfAaRIqiPxbMhvWi/5Z63E5PC/EtPZefDVjTIRYI6x1xEdlm0EElh/6mUHGbWaXgF6glEfFScfom1gvvJxkZWJDHF6wpteRrn0HKvWhrfNzEhzKBLj5Qe2lm91UKFjrMrNYZRuYy/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=health.ucsd.edu; dmarc=pass action=none header.from=health.ucsd.edu; dkim=pass header.d=health.ucsd.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsdhs.onmicrosoft.com; s=selector2-ucsdhs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kB2McJYUwr1Q5U0Xcx9/RvCUpIxeRr33wZvjQJiec+g=; b=gXUISRlv/2MJETeZ21GDrFEaFMopXyu3vuLBcJFPZuEyY/hyU7MtKeJlCmI6dAroHzxzWUcQva8UqYR+kqZpuEiDnf6Ou7tMttbyxseLPNa0+eBLq5kzluGeYpItWpxk3mNtl50YOxLTBFPuPyopYpAyN6118io1yt/jAJbFa0A= To: Jack Kamm Subject: Re: Help debugging R source code block output problem with :session Thread-Topic: Help debugging R source code block output problem with :session Thread-Index: AQHWfkPgfdvDvowZ7Uinebx1ikESsqlc4oaAgAAHZ4CAAJTBAA== Date: Mon, 7 Sep 2020 17:37:51 +0000 Message-ID: <48AD2294-E831-44D7-B564-0F7B4019C61B@health.ucsd.edu> References: <87r1rqled0.fsf@havana> <87k0xifa9h.fsf@gmail.com> <87d03art6a.fsf@havana> <87h7slgbi5.fsf@gmail.com> <352C7149-743F-4944-ACA5-7A1242B5A3AA@health.ucsd.edu> <87tuwa9ez4.fsf@gmail.com> <87pn6y9dqy.fsf@gmail.com> In-Reply-To: <87pn6y9dqy.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2600:1702:1021:b0:e867:f055:2d51:ea85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f5a5025-00a7-464e-ac92-08d85354be95 x-ms-traffictypediagnostic: BY5PR19MB3873: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2150; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ySaGtu73JIPD/yTwUPAHIb+J9dnSnCam8kwlOxWOkBlkmobp9Cc9/OzrS2nfe9LmM0ZludbcJ0GTcHl3MQ4f3TtIgDGHX031e7Ce10v2uhtrNWBm8WurySdSvGdOSXAL583RNjbDCtYJeL08yVjBPMwylZo2BNnfDohimPMfaoPb0dYu0WemK4u1eneNfZiRMdB+IOjL6GLJyB+zHBwRT2WwnAQhF4zhpeoOt4/es62+D50dWyB2xdg0jtYCGCKZVFQWD1rnOWCBSyTyRCEylyhrRsSZvFok2ltPi9NZOXpYLM8hADSxVOclj9iuLfN8ENYIdKY3HJvaiEdeBFLwpw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR19MB2888.namprd19.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39850400004)(346002)(366004)(136003)(86362001)(75432002)(186003)(2906002)(478600001)(54906003)(5660300002)(4326008)(33656002)(6916009)(76116006)(66556008)(66476007)(66946007)(64756008)(6506007)(6486002)(66446008)(53546011)(83380400001)(316002)(8936002)(8676002)(71200400001)(2616005)(6512007)(786003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: hp0rDuqXB69mJFn9Z9wWnIE5Ap/Jde1smutR35o+QBSC/S6BMdrepJAFrpl61j7o8WMWqGJ2veqEMsNYZ/21A44iNv09EgAD6CcFBTZmmBue5fbRNsqPY719uVayIk0HfT4Db3O2INiJsUIMGp9T3z4jT3Zp7GJ4j1AE1sSV7cvDkxWf1nBEzBTo3RyybrgRC72aB7CyzRncks11HTZM4B3IFvxADfE7u3fuaxeRSTZlLD6Igpp4ca6dhDMw76K75Qk79/o84BPY76efRe4XePrhu+wZvwecPsCvnIAie970Of9DEpLp1gYxgJZJbGQNCT+t9wed7YMqZbqJAMzD7xe3XGM6u3qhZWFITegaapTn3/8kDKXJO3txGlZludN3fJbVXx5ypw6btWdDY/lEiK0FGi7guTBYxCnzcRZxTt+4K3AjCLwDquy0QjqpWPddbuJmA/dn0vu7U7eXZZqv8olWzROF9WUmRr4UkvWrTcsX/NJXJyeczlVWoQax/qyGrg16F5CciHr2R/cfS21zpRnj0asAvlBz2eCXMedlUxwtfvurZsgNS7PXdg1O9WUYRrX/ldpY8Xeo+5fxn2ZKLAzG5qIIY7VJ7x50MBpwLKJPC3gFsVn929I1TaVVg1QfL8CNO/7ZFq/2A19JBeKUjnQvENu+VeQFr0TtRBvy3vuEiB/XjW8k9PuDF3hTSAo1K+5e5VFaI+0RgYV3beaq0A== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: health.ucsd.edu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR19MB2888.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f5a5025-00a7-464e-ac92-08d85354be95 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2020 17:37:51.0974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e470d736-e7f7-41a8-8eab-dad544b2b579 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZTkry2aETzbRCl9G5nquHnlbzOrZysY8otD+3E43r4ECc19bmgn7EvnECienjsdcEe+8aGyl9GpMDJV4iNkLPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR19MB3873 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-07_11:2020-09-07, 2020-09-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 priorityscore=1501 mlxscore=0 adultscore=0 phishscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009070168 Received-SPF: pass client-ip=148.163.133.170; envelope-from=ccberry@health.ucsd.edu; helo=mx0a-00395d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/07 13:37:54 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: "emacs-orgmode@gnu.org" , Dylan Schwilk Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" Reply-to: "Berry, Charles" From: "Berry, Charles" via "General discussions about Org-mode." X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=ucsd.edu header.s=campus header.b=DKQ0mM+w; dkim=fail (rsa verify failed) header.d=ucsdhs.onmicrosoft.com header.s=selector2-ucsdhs-onmicrosoft-com header.b=gXUISRlv; 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: 1.99 X-TUID: 1k64vSSKJRWJ Jack, This does not work for my remote session. I run from macOS locally and on a Linux host remotely. I use=20 M-x shell RET R RET M-x ess-remote RET R RET to start the R session. The problem is that tempfiles on the remote host are like "/tmp/RtmpeFHudh/= file23a66d2fc1f9", but emacs tries to use '/var/folders/kb/2hchpbyj7lb6z76l= 0q73w_fh0000gn/T/babel-OSXKNd/R-oNOVVB' `org-babel-temp-file' doesn't honor remote connections AFAICS. Maybe there is some comint or tramp idiom that would solve this, but I do n= ot know what it is. Chuck > On Sep 7, 2020, at 1:45 AM, Jack Kamm wrote: >=20 > I just realized my patch had an issue where it freezes if there is an > error in the source block. >=20 > I'm attaching a second patch, to be applied on top of the first one, that= fixes the issue. >=20 > diff --git a/lisp/ob-R.el b/lisp/ob-R.el > index b37e3965a..5ddf0ebd1 100644 > --- a/lisp/ob-R.el > +++ b/lisp/ob-R.el > @@ -441,7 +441,7 @@ (defun org-babel-R-evaluate-session > (output > (let* ((tmp-file (org-babel-temp-file "R-"))) > (with-temp-file tmp-file > - (insert (concat body "\n" org-babel-R-eoe-indicator))) > + (insert body)) > (with-current-buffer session > (let* ((process (get-buffer-process (current-buffer))) > (string-buffer "") > @@ -450,8 +450,9 @@ (defun org-babel-R-evaluate-session > (concat string-buffer text))) > comint-output-filter-functions))) > (ess-send-string > - process (format "source('%s', print.eval=3DTRUE)" > - (org-babel-process-file-name tmp-file 'noquote))) > + process (format "tryCatch(source('%s', print.eval=3DTRUE), finally= =3Dprint(%s))" > + (org-babel-process-file-name tmp-file 'noquote) > + org-babel-R-eoe-indicator)) > (while (not (string-match (regexp-quote org-babel-R-eoe-output) > string-buffer)) > (accept-process-output process))