From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Delean Subject: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)] Date: Mon, 9 Mar 2020 14:42:57 +0000 Message-ID: <20200310011255.2d045f82@t460> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55687) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBJca-0004Fp-Aj for emacs-orgmode@gnu.org; Mon, 09 Mar 2020 10:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBJcZ-0004ml-0F for emacs-orgmode@gnu.org; Mon, 09 Mar 2020 10:43:08 -0400 Received: from mta-dc2-n0.services.adelaide.edu.au ([129.127.208.21]:54346) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBJcY-0004gQ-Ez for emacs-orgmode@gnu.org; Mon, 09 Mar 2020 10:43:06 -0400 Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" Hi, HTML table produced from a source code block (using R code) does not displa= y because html code is not formatted correctly in the exported html output. T= he source code block uses: #+begin_src R :results output html :exports both zd <- data.frame(a =3D 1:3, b =3D letters[1:3]) knitr:::kable(zd) #+end_src Each line in the html table that is produced is broken mid-line where a > symbol is replaced with a line feed. The html code that is produced shows t= hat there is a line feed where there should be a > symbol after the ;" for each= th header tag in the table.
Thanks for your time, Best regards, Steve Emacs : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30= ) of 2019-09-17 Package: Org mode version 9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Kamm Subject: Re: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)] Date: Tue, 10 Mar 2020 17:17:48 -0700 Message-ID: <87ftef218z.fsf@gmail.com> References: <20200310011255.2d045f82@t460> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56930) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBp5e-0005NF-CZ for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 20:19:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBp5c-0000g7-UX for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 20:19:14 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:50850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBp5c-0000U2-MI for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 20:19:12 -0400 Received: by mail-pj1-x1034.google.com with SMTP id u10so64691pjy.0 for ; Tue, 10 Mar 2020 17:19:11 -0700 (PDT) In-Reply-To: <20200310011255.2d045f82@t460> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Steven Delean , "emacs-orgmode@gnu.org" Hi Steve, Steven Delean writes: > HTML table produced from a source code block (using R code) does not display > because html code is not formatted correctly in the exported html output. I believe this is the same issue as reported here: https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00267.html Though, that thread was for ":session" blocks, and it's unclear whether you're using session or non-session evaluation here. Anyways, that thread suggests that ":results value html" works correctly, does switching to that work for you? If I'm correct, the basic problem is that ob-R tries to remove interactive shell prompts like ">" from the output. This can also cause other problems. I think it can be fixed by changing ob-R to use `ess-eval-region' to evaluate code, I'll try to submit a patch for this after 9.4 is released. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Delean Subject: Re: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)] Date: Wed, 11 Mar 2020 03:07:01 +0000 Message-ID: <20200311133658.25b98cc8@t460> References: <20200310011255.2d045f82@t460> <87ftef218z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48207) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBriC-0004RW-Tp for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 23:07:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBriB-0000zM-HV for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 23:07:12 -0400 Received: from mta-dc1-n0.services.adelaide.edu.au ([129.127.208.1]:18949) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBriA-0000mA-VT for emacs-orgmode@gnu.org; Tue, 10 Mar 2020 23:07:11 -0400 In-Reply-To: <87ftef218z.fsf@gmail.com> Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Jack Kamm Cc: Steven Delean , "emacs-orgmode@gnu.org" Hi Jack, Thanks for your response. Yes, I am using :session evaluation here, set using #+PROPERTY: However, ":results value html" does not work for me. In fact, this produces= no table output at all in the resulting exported html file. The output sent to the R :session buffer is printed correctly (when using either :results value html or :results output html). As you say, it is the exporter that is removing ">" from the output. If I remove :session evaluation, I also get no output at all from these cod= e blocks in the exported html. The change has been introduced within the last 12 months, as my scripts exported with correct html formatting when I used them for last years' clas= ses. Best regards, Steve On Tue, 10 Mar 2020 17:17:48 -0700 Jack Kamm wrote: > Hi Steve, > > Steven Delean writes: > > > HTML table produced from a source code block (using R code) does not di= splay > > because html code is not formatted correctly in the exported html outpu= t. > > I believe this is the same issue as reported here: > https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00267.html > > Though, that thread was for ":session" blocks, and it's unclear whether > you're using session or non-session evaluation here. > > Anyways, that thread suggests that ":results value html" works > correctly, does switching to that work for you? > > If I'm correct, the basic problem is that ob-R tries to remove > interactive shell prompts like ">" from the output. This can also cause > other problems. I think it can be fixed by changing ob-R to use > `ess-eval-region' to evaluate code, I'll try to submit a patch for this > after 9.4 is released. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Delean Subject: Re: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)] Date: Thu, 12 Mar 2020 01:16:42 +0000 Message-ID: <20200312114641.60e7b493@t460> References: <20200310011255.2d045f82@t460> <87ftef218z.fsf@gmail.com> <20200311133658.25b98cc8@t460> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCCSy-0008J3-Bf for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 21:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCCSw-00067Y-RV for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 21:16:52 -0400 Received: from mta-dc1-n0.services.adelaide.edu.au ([129.127.208.1]:30566) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCCSw-0005oj-8X for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 21:16:50 -0400 In-Reply-To: <20200311133658.25b98cc8@t460> Content-Language: en-US Content-ID: <67FD11539A55F94EB604B23C8EE10201@AUSP282.PROD.OUTLOOK.COM> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Steven Delean Cc: Jack Kamm , "emacs-orgmode@gnu.org" Hello again Jack, I am trying to use ob-session-async as a workaround for this problem. In my R :session, the correct output is printed to screen, followed by a UU= ID if I use :results output html, which is printed as, e.g., [1] "ob_comint_async_R_end_4d2e818b7c2544da6f026d0413c7ac6c" Alternatively, if I use :results value html then the tempfile path is print= ed as: [1] "ob_comint_async_R_file_/tmp/babel-6BGHQK/R-QNasco" The problem, however, is that what is exported to html and displayed in the exported block is either the actual UUID or the tempfile path and not the results from evaluating the R code. In the case of the tempfile, the tempfi= le exists but is empty. Any advice as to how to resolve this would be greatly appreciated, thanks. Best regards, Steve On Wed, 11 Mar 2020 13:37:01 +1030 Steven Delean wrote: > Hi Jack, > > Thanks for your response. > > Yes, I am using :session evaluation here, set using #+PROPERTY: > > However, ":results value html" does not work for me. In fact, this produc= es no > table output at all in the resulting exported html file. > > The output sent to the R :session buffer is printed correctly (when using > either :results value html or :results output html). As you say, it is th= e > exporter that is removing ">" from the output. > > If I remove :session evaluation, I also get no output at all from these c= ode > blocks in the exported html. > > The change has been introduced within the last 12 months, as my scripts > exported with correct html formatting when I used them for last years' > classes. > > Best regards, > Steve > > On Tue, 10 Mar 2020 17:17:48 -0700 > Jack Kamm wrote: > > > Hi Steve, > > > > Steven Delean writes: > > > > > HTML table produced from a source code block (using R code) does not > > > display because html code is not formatted correctly in the exported = html > > > output. > > > > I believe this is the same issue as reported here: > > https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00267.html > > > > Though, that thread was for ":session" blocks, and it's unclear whether > > you're using session or non-session evaluation here. > > > > Anyways, that thread suggests that ":results value html" works > > correctly, does switching to that work for you? > > > > If I'm correct, the basic problem is that ob-R tries to remove > > interactive shell prompts like ">" from the output. This can also cause > > other problems. I think it can be fixed by changing ob-R to use > > `ess-eval-region' to evaluate code, I'll try to submit a patch for this > > after 9.4 is released. 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 sHkrMoMGn19kZQAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 19:03:31 +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 2IwcLoMGn18HLwAAbx9fmQ (envelope-from ) for ; Sun, 01 Nov 2020 19:03:31 +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 DC3509403A6 for ; Sun, 1 Nov 2020 19:03:30 +0000 (UTC) Received: from localhost ([::1]:38884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZIdV-00018D-7v for larch@yhetil.org; Sun, 01 Nov 2020 14:03:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZId3-00017y-Nz for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 14:03:02 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:45959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZId1-0007d7-It for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 14:03:01 -0500 Received: by mail-pl1-x62b.google.com with SMTP id z1so5701090plo.12 for ; Sun, 01 Nov 2020 11:02:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=YSlfNcS9lZcjbKka//JF9/SPYovrpTgVLlUzPRi9m2c=; b=cGFwBCO+6be3DYBFuf6QIXzc62Q9Nh98dgMYzbDk0zyJoX/8z7sj3EUT7eTit8dsii mTCjNt4pmMG7OZrGSCFiVRrQzGTXyWy3VTHbeNifh+vNKki/1UmqMpyf7UAaHOfIglgo BWiUg6JdeAh9+qMVLcoxjaFnpyDzp2zwp/rDcgf/a5fSQU57hT7Cg/C7IPZm69+DJCfy Zw4MUnDxbkpLBYYAekJfA+CE4RFQO+QiX2I4t1pZwy7JkYV+6w/PdKAEgY/jdv7dM62G ltzozNp4mSuTMbRMCWQqnvmQUYNHQBayDhkqH+rLico6DvWfiozgvqFoadY7wll106zD AHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=YSlfNcS9lZcjbKka//JF9/SPYovrpTgVLlUzPRi9m2c=; b=UZ6jdGX7lgd4Xko33Q2Wo7Z1lBHsPFuUghipp2cAg8DOChNE9J+JxQEY47J2rqcsDI OOb3M5wzz65e+i78fOF+ZQ4xKIigVBRIouflk5DpeYw7JBpjyfGeJaqS1DYrGTVih4VZ /xuMCHxyaDtW9nskli7qa1Ds9MYDCJzdjnxFLKCaoB6pL2vaZLa6tHNv7AGbN9RigNd3 f8TPg1E5MdE0AMZd6PYJqGVS+aZsP4nHXOxWecQZ9/VRKcVmON2ILLSayRuxdUfY9VGW prRxlh87yJJ8HidbTv4ij4Riq4h2CS7UaPy7yI87Ggh2TrWDKaK33O/peDK4BFTSMfc/ x8kg== X-Gm-Message-State: AOAM532llwB00uxXmgoql9wQT6RRW+QRSQRorUAF9PE58Uc/xBej0REk PJ6yBEFZI8p1FeL6V0yu9ngiGo9VrN8= X-Google-Smtp-Source: ABdhPJwTFw/6JP8C0SSWqORnkzh9y3eLI3ukKpPZNYtUenYSx4r+PDJfNC4UqRf6ar8jWxGHDo3KlQ== X-Received: by 2002:a17:90b:23d5:: with SMTP id md21mr7013727pjb.81.1604257377849; Sun, 01 Nov 2020 11:02:57 -0800 (PST) Received: from localhost (199-83-220-90.PUBLIC.monkeybrains.net. [199.83.220.90]) by smtp.gmail.com with ESMTPSA id c193sm2100293pfb.78.2020.11.01.11.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Nov 2020 11:02:57 -0800 (PST) From: Jack Kamm To: Steven Delean , Steven Delean Subject: Re: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)] In-Reply-To: <20200312114641.60e7b493@t460> References: <20200310011255.2d045f82@t460> <87ftef218z.fsf@gmail.com> <20200311133658.25b98cc8@t460> <20200312114641.60e7b493@t460> Date: Sun, 01 Nov 2020 11:02:56 -0800 Message-ID: <87ft5sq4rj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=jackkamm@gmail.com; helo=mail-pl1-x62b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cGFwBCO+; dmarc=pass (policy=none) header.from=gmail.com; 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.71 X-TUID: e4mjjU1qV/2x Hi Steven, Sorry for the delayed response. > The problem, however, is that what is exported to html and displayed in the > exported block is either the actual UUID or the tempfile path and not the > results from evaluating the R code. In the case of the tempfile, the tempfile > exists but is empty. Yes, async doesn't work well with export. I think it would be very challenging to make it work correctly. For my recent patch to add this functionality into org-mode [0], my workaround was to simply disable async evaluation during export. [0] https://orgmode.org/list/87h7qi2l2m.fsf@gmail.com/