From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: :no-expand not working on variables? Date: Tue, 08 Apr 2014 22:02:17 +0200 Message-ID: References: <87k3bbg4ga.fsf@gmail.com> <8761mqo5wn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXcE5-0003Zt-B1 for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 16:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXcE0-0001ul-6V for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 16:02:33 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:34402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXcDz-0001uh-TW for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 16:02:28 -0400 Received: by mail-wi0-f176.google.com with SMTP id r20so7737514wiv.15 for ; Tue, 08 Apr 2014 13:02:26 -0700 (PDT) In-Reply-To: <8761mqo5wn.fsf@gmail.com> (Eric Schulte's message of "Wed, 02 Apr 2014 17:10:23 -0600") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Eric Schulte writes: > Rainer M Krug writes: > >> Eric Schulte writes: >> >>> According to the manual :no-expand is only supposed to have an effect >>> during tangling, not execution. >> >> Thanks Eric - re-reading the manual, it became clear. Maybe to clarify >> this in the manual, one could say: >> >> ,---- >> | The `:no-expand' header argument can be used to turn off this behavior >> | for tangling and has no effect on the expansion during code execution. >> `---- >> >> instead of: >> >> ,---- >> | The `:no-expand' header argument can be used to turn off this behavior. >> `---- >> > > Could you supply a patch? Sorry - sure. Attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0007-Add-clarification-to-no-expand-header-argument.patch Content-Transfer-Encoding: quoted-printable Content-Description: PAtch From=20924fc6e3f54d4a193387e010906bcb4bdda3f324 Mon Sep 17 00:00:00 2001 From: "Rainer M. Krug" Date: Tue, 8 Apr 2014 21:51:48 +0200 Subject: [PATCH 7/7] Add clarification to `:no-expand' header argument * doc/org.texi (no-expand): Added statement to clarify that this header argument has no impact on the execution of a code block. TINYCHANGE =2D-- doc/org.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/org.texi b/doc/org.texi index 05b1888..cc51cae 100644 =2D-- a/doc/org.texi +++ b/doc/org.texi @@ -15002,6 +15002,9 @@ during tangling. This has the effect of assigning = values to variables specified with @code{:var} (see @ref{var}), and of replacing ``noweb'' references (see @ref{Noweb reference syntax}) with their targets. The @code{:no-expand} header argument can be used to turn off this behavior. +Note: The @code{:no-expand} header argument has no impact on export, +i.e. code blocks will irrespective of this header argument expanded for +execution. =20 @node session @subsubsection @code{:session} =2D-=20 1.8.5.2 (Apple Git-48) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > > Sorry to ask for such a trivial thing, but I'm *very* short on time > these days, and applying a patch is *much* easier. Sure - should have done it instead of asking. Cheers, Rainer > > Thanks, > >> >> Rainer >> >>> >>> Best, >>> >>> Rainer M Krug writes: >>> >>>> Hi >>>> >>>> shouldn't the following not give an error from R as it should not be >>>> expanding the variables? >>>> >>>> --8<---------------cut here---------------start------------->8--- >>>> #+PROPERTY: no-expand TRUE >>>> #+PROPERTY: var YEAR=3D2014 >>>> >>>> * a noexpand code >>>> >>>> #+begin_src R :results output :no-expand >>>> cat(YEAR) >>>> #+end_src >>>> >>>> #+RESULTS: >>>> : 2014 >>>> --8<---------------cut here---------------end--------------->8--- >>>> >>>> The manual states: >>>> >>>> ,---- >>>> | 14.8.2.11 `:no-expand' >>>> | ...................... >>>> |=20 >>>> | By default, code blocks are expanded with `org-babel-expand-src-bloc= k' >>>> | during tangling. This has the effect of assigning values to variabl= es >>>> | specified with `:var' (see *Note var::), and of replacing "noweb" >>>> | references (see *Note Noweb reference syntax::) with their targets. = The >>>> | `:no-expand' header argument can be used to turn off this behavior. >>>> `---- >>>> >>>> Org-mode version 8.2.5h (release_8.2.5h-869-gdcfe09 @ >>>> /Users/rainerkrug/.emacs.d/org-mode/lisp/) >>>> >>>> Cheers, >>>> >>>> Rainer =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTRFXNAAoJENvXNx4PUvmCssoIAJwvGftE49zul5XGhLJKVKZg +CxUA4nheZcFO0/I107JAGMA1U+Na1Vpg4mmIISlVW+m1c4gawV8RgBky6qZuBT2 X75zQhZerjTDhTp+BNIv1lg/Hehn6Ju87gjmpLSXolV/mS087MaADXQa/+2jq0er 4vFo4dWs3YZ8a0FWnACrnXPJIaQd3Jp3BSVGplx4Nsil/3RQfLZA3g2wwUR+ZqPc 4m7yUa2qjuAwo2u8u/ggSx72JbW8zvyN0tpU+03a90TNGs1z8iCUWSIhJrpXhpIO 41qgf1yeogKX+8/9WbZYNhK0PsRM87q8YEHOYYLVnyvpTejq6XRE2DA1DE5L7Uc= =S9bv -----END PGP SIGNATURE----- --==-=-=--