* :no-expand not working on variables? @ 2014-03-28 14:57 Rainer M Krug 2014-03-28 15:27 ` Sebastien Vauban 2014-03-30 14:13 ` Eric Schulte 0 siblings, 2 replies; 8+ messages in thread From: Rainer M Krug @ 2014-03-28 14:57 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1057 bytes --] 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=2014 * 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' | ...................... | | By default, code blocks are expanded with `org-babel-expand-src-block' | during tangling. This has the effect of assigning values to variables | 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 -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-03-28 14:57 :no-expand not working on variables? Rainer M Krug @ 2014-03-28 15:27 ` Sebastien Vauban 2014-03-28 17:17 ` Rainer M Krug 2014-03-30 14:13 ` Eric Schulte 1 sibling, 1 reply; 8+ messages in thread From: Sebastien Vauban @ 2014-03-28 15:27 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Rainer M Krug wrote: > shouldn't the following not give an error from R as it should not be > expanding the variables? > > #+PROPERTY: no-expand TRUE I guess this should be: #+PROPERTY: no-expand yes Best regards, Seb -- Sebastien Vauban ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-03-28 15:27 ` Sebastien Vauban @ 2014-03-28 17:17 ` Rainer M Krug 0 siblings, 0 replies; 8+ messages in thread From: Rainer M Krug @ 2014-03-28 17:17 UTC (permalink / raw) To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ [-- Attachment #1: Type: text/plain, Size: 437 bytes --] Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes: > Rainer M Krug wrote: >> shouldn't the following not give an error from R as it should not be >> expanding the variables? >> >> #+PROPERTY: no-expand TRUE > > I guess this should be: > > #+PROPERTY: no-expand yes Nope - the same. Rainer > > Best regards, > Seb -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-03-28 14:57 :no-expand not working on variables? Rainer M Krug 2014-03-28 15:27 ` Sebastien Vauban @ 2014-03-30 14:13 ` Eric Schulte 2014-03-31 7:34 ` Rainer M Krug 1 sibling, 1 reply; 8+ messages in thread From: Eric Schulte @ 2014-03-30 14:13 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode According to the manual :no-expand is only supposed to have an effect during tangling, not execution. Best, Rainer M Krug <Rainer@krugs.de> 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=2014 > > * 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' > | ...................... > | > | By default, code blocks are expanded with `org-babel-expand-src-block' > | during tangling. This has the effect of assigning values to variables > | 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 -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-03-30 14:13 ` Eric Schulte @ 2014-03-31 7:34 ` Rainer M Krug 2014-04-02 23:10 ` Eric Schulte 0 siblings, 1 reply; 8+ messages in thread From: Rainer M Krug @ 2014-03-31 7:34 UTC (permalink / raw) To: Eric Schulte; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1767 bytes --] Eric Schulte <schulte.eric@gmail.com> 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. `---- Rainer > > Best, > > Rainer M Krug <Rainer@krugs.de> 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=2014 >> >> * 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' >> | ...................... >> | >> | By default, code blocks are expanded with `org-babel-expand-src-block' >> | during tangling. This has the effect of assigning values to variables >> | 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 -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-03-31 7:34 ` Rainer M Krug @ 2014-04-02 23:10 ` Eric Schulte 2014-04-08 20:02 ` Rainer M Krug 0 siblings, 1 reply; 8+ messages in thread From: Eric Schulte @ 2014-04-02 23:10 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode Rainer M Krug <Rainer@krugs.de> writes: > Eric Schulte <schulte.eric@gmail.com> 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 to ask for such a trivial thing, but I'm *very* short on time these days, and applying a patch is *much* easier. Thanks, > > Rainer > >> >> Best, >> >> Rainer M Krug <Rainer@krugs.de> 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=2014 >>> >>> * 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' >>> | ...................... >>> | >>> | By default, code blocks are expanded with `org-babel-expand-src-block' >>> | during tangling. This has the effect of assigning values to variables >>> | 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 -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-04-02 23:10 ` Eric Schulte @ 2014-04-08 20:02 ` Rainer M Krug 2014-04-16 15:42 ` Bastien 0 siblings, 1 reply; 8+ messages in thread From: Rainer M Krug @ 2014-04-08 20:02 UTC (permalink / raw) To: Eric Schulte; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 716 bytes --] Eric Schulte <schulte.eric@gmail.com> writes: > Rainer M Krug <Rainer@krugs.de> writes: > >> Eric Schulte <schulte.eric@gmail.com> 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. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: PAtch --] [-- Type: text/x-patch, Size: 1111 bytes --] From 924fc6e3f54d4a193387e010906bcb4bdda3f324 Mon Sep 17 00:00:00 2001 From: "Rainer M. Krug" <R.M.Krug@gmail.com> 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 --- doc/org.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/org.texi b/doc/org.texi index 05b1888..cc51cae 100644 --- 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. @node session @subsubsection @code{:session} -- 1.8.5.2 (Apple Git-48) [-- Attachment #1.3: Type: text/plain, Size: 1896 bytes --] > > 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 <Rainer@krugs.de> 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=2014 >>>> >>>> * 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' >>>> | ...................... >>>> | >>>> | By default, code blocks are expanded with `org-babel-expand-src-block' >>>> | during tangling. This has the effect of assigning values to variables >>>> | 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 -- 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 [-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: :no-expand not working on variables? 2014-04-08 20:02 ` Rainer M Krug @ 2014-04-16 15:42 ` Bastien 0 siblings, 0 replies; 8+ messages in thread From: Bastien @ 2014-04-16 15:42 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode, Eric Schulte Hi Rainer, Rainer M Krug <Rainer@krugs.de> writes: > Sorry - sure. Attached. Applied in master, thanks, -- Bastien ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-16 16:49 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-28 14:57 :no-expand not working on variables? Rainer M Krug 2014-03-28 15:27 ` Sebastien Vauban 2014-03-28 17:17 ` Rainer M Krug 2014-03-30 14:13 ` Eric Schulte 2014-03-31 7:34 ` Rainer M Krug 2014-04-02 23:10 ` Eric Schulte 2014-04-08 20:02 ` Rainer M Krug 2014-04-16 15:42 ` Bastien
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).