From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?=22Martin_G=C3=BCrtler=22?= Subject: src blocks: code is /always/ exported Date: Thu, 29 Dec 2016 15:53:38 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMc5T-0002IV-S3 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 09:53:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMc5Q-0006aZ-RU for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 09:53:47 -0500 Received: from mout.gmx.net ([212.227.15.18]:63788) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMc5Q-0006ZI-I8 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 09:53:44 -0500 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.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org
Dear list,
I am exporting the following org mode file:
----8<--------------------
* doc
#+BEGIN_SRC shell :exports none
ls |wc
#+END_SRC
#+RESULTS:
: 20      20     199
----8<--------------------
I'd expect org mode to honour the :exports none header argument and
create a document that contains only the result.
However, the exported document contains  both, code and results.
This seems to be independent of the type of SRC and independent of the
export type (I tried dot and shell for odt, latex and beamer exports).
How can I get rid of the src code in the exported document?
Thanks for help,
Martin
------------------------------------------------------------------------
Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.4)
 of 2016-12-01, modified by Debian
Package: Org mode version 9.0.3 (9.0.3-elpaplus @ /home/guertler/.emacs.d/elpa/org-plus-contrib-20161224/)
 
From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: src blocks: code is /always/ exported Date: Thu, 29 Dec 2016 09:07:40 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-776482508-1483031261=:668" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMeBA-0007Ek-3z for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 12:07:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMeB6-0003X4-Ua for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 12:07:48 -0500 Received: from iport-acv3-out.ucsd.edu ([132.239.0.4]:18565) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMeB6-0003Vv-H3 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 12:07:44 -0500 In-Reply-To: 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.org@gnu.org Sender: "Emacs-orgmode" To: =?ISO-8859-15?Q?=22Martin_G=FCrtler=22?= Cc: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-776482508-1483031261=:668 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 29 Dec 2016, "Martin Gürtler" wrote: > Dear list, > I am exporting the following org mode file: > ----8<-------------------- > * doc > #+BEGIN_SRC shell :exports none > ls |wc > #+END_SRC > #+RESULTS: > : 20      20     199 > ----8<-------------------- > I'd expect org mode to honour the :exports none header argument and > create a document that contains only the result. > However, the exported document contains  both, code and results. > This seems to be independent of the type of SRC and independent of the > export type (I tried dot and shell for odt, latex and beamer exports). > How can I get rid of the src code in the exported document? What does C-h v org-export-use-babel RET say? If the result is not `t' that is the problem, and somewhere in your setup you have set that variable (or its predecessor org-export-babel-evaluate) to nil or something other than `t'. If this is the problem, set org-export-use-babel to `t'. You might also note the advice in the docstring: "Users who wish to avoid evaluating code on export should use the header argument ‘:eval never-export’." HTH, Chuck --0-776482508-1483031261=:668-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin =?ISO-8859-1?Q?G=FCrtler?= Subject: Re: src blocks: code is /always/ exported Date: Thu, 29 Dec 2016 19:45:50 +0100 Message-ID: <3083091.RUdT2yByqR@bombus> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7440468.KbFj10SYXa"; micalg="pgp-sha256"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMfiY-0002B1-V0 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 13:46:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMfiV-0002Ip-Pi for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 13:46:23 -0500 Received: from mout.gmx.net ([212.227.15.19]:50364) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMfiV-0002GR-E9 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 13:46:19 -0500 In-Reply-To: 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.org@gnu.org Sender: "Emacs-orgmode" To: "Charles C. Berry" Cc: emacs-orgmode@gnu.org --nextPart7440468.KbFj10SYXa Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Am Donnerstag, 29. Dezember 2016, 09:07:40 CET schrieb Charles C. Berry: > On Thu, 29 Dec 2016, "Martin G=FCrtler" wrote: > > Dear list, > > I am exporting the following org mode file: > > ----8<-------------------- > > * doc > > #+BEGIN_SRC shell :exports none > > ls |wc > > #+END_SRC > >=20 > > #+RESULTS: > > : 20 20 199 > >=20 > > ----8<-------------------- I'd expect org mode to honour the > > :exports none header argument and create a document that contains > > only the result. However, the exported document contains both, code > > and results. This seems to be independent of the type of SRC and > > independent of the export type (I tried dot and shell for odt, latex > > and beamer exports). How can I get rid of the src code in the > > exported document? >=20 > What does C-h v org-export-use-babel RET say? >=20 > If the result is not `t' that is the problem, and somewhere in your setup > you have set that variable (or its predecessor org-export-babel-evaluate) > to nil or something other than `t'. That was indeed the culprit. I had switched it off to speed up export. After setting that to t again it works (of course). Drawbacks are, that I need to confirm the evaluation in each export (I am a bit hesitant to generally accepting src block evaluation), and evaluation takes time. I do not really need src block evaluation during export. I only need to evaluate (manually) when I changed the graphics src, what I am doing anyway to check the changed image. But how would I control the (not-)inclusion of the src code during export in that case? Thanks, Martin --nextPart7440468.KbFj10SYXa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEqtklbEgX6LLFRqEHKKc62Q3OCnQFAlhlWd4ACgkQKKc62Q3O CnSYJAgAilqu2FTj+CU51V7hE1uJ6ZUxsihhqAYi0MV4eKDBHgA41sCEfpTuroiW 3mD0m3kEOL8fgz/b1Qo4nl23L3d+pbHp2lkDSTCic2KZQ1X6g9vuOPDL0bxHpcwW X8h+d83d20aq02kxlknkI98v0fz52O7vMkmW8MxToftLpYJihKUesTRFguTTG3dq j6CmoDH3ZRaUBElZpoA1Fg480Q9OG50HbAT6ghGCyhkZrqec++8DQfbFZJdsbRwt Wi9aOQat0Kd2w35pw13p95dCyfw9hLRskYoD8HNzlM3wmMty5tMpBkFXjEsK4ivJ 9l1jQfcZCgOBB84d5gnTtnxyfdRx4Q== =eDeo -----END PGP SIGNATURE----- --nextPart7440468.KbFj10SYXa-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Lars E. Pettersson" Subject: Re: src blocks: code is /always/ exported Date: Thu, 29 Dec 2016 21:05:51 +0100 Message-ID: References: <3083091.RUdT2yByqR@bombus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMgxb-0000uh-S5 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:06:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMgxW-0003Hg-Uq for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:05:59 -0500 Received: from vps.homer.se ([213.188.153.117]:59368 helo=mail.homer.se) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMgxW-0003Gi-OK for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:05:54 -0500 Received: from tux.home.rpz (90-230-99-143-no22.tbcn.telia.com [90.230.99.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.homer.se (Postfix) with ESMTPSA id CF043DC068D for ; Thu, 29 Dec 2016 21:05:51 +0100 (CET) In-Reply-To: <3083091.RUdT2yByqR@bombus> 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.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org On 12/29/16 19:45, Martin G=C3=BCrtler wrote: > I do not really need src block evaluation during export. I only need to > evaluate (manually) when I changed the graphics src, what I am doing > anyway to check the changed image. > > But how would I control the (not-)inclusion of the src code during > export in that case? I am using the following: (add-to-list 'org-babel-default-header-args '(:eval . "never-export")) (add-to-list 'org-babel-default-inline-header-args '(:eval .=20 "never-export")) Lars --=20 Lars E. Pettersson http://www.sm6rpz.se/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: src blocks: code is /always/ exported Date: Thu, 29 Dec 2016 12:12:59 -0800 Message-ID: References: <3083091.RUdT2yByqR@bombus> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-1180474196-1483042380=:1947" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMh4a-0002QR-BJ for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:13:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMh4T-0006sX-Iv for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:13:12 -0500 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:28410) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMh4T-0006rI-6S for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 15:13:05 -0500 In-Reply-To: <3083091.RUdT2yByqR@bombus> 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.org@gnu.org Sender: "Emacs-orgmode" To: =?ISO-8859-15?Q?Martin_G=FCrtler?= Cc: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1180474196-1483042380=:1947 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 29 Dec 2016, Martin Gürtler wrote: > Am Donnerstag, 29. Dezember 2016, 09:07:40 CET schrieb Charles C. Berry: >> On Thu, 29 Dec 2016, "Martin Gürtler" wrote: >>> Dear list, >>> I am exporting the following org mode file: [deleted] > > But how would I control the (not-)inclusion of the src code during > export in that case? As I wrote: #+begin_quote You might also note the advice in the docstring: "Users who wish to avoid evaluating code on export should use the header argument ‘:eval never-export’." #+end_quote If that was not clear, review (info "(org) Exporting code blocks") particularly the paragraph that starts "Turning off evaluation..." Chuck --0-1180474196-1483042380=:1947--