[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Running babel blocks in :noexport: sections
From: |
Eric Schulte |
Subject: |
Re: [O] Running babel blocks in :noexport: sections |
Date: |
Sat, 27 Oct 2012 16:57:36 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
John Hendy <address@hidden> writes:
> For papers and beamer presentations, I sometimes hide more "universal"
> babel blocks inside a sort of setup headline. I thought I'd done this
> before, but perhaps not... The idea would be like so:
>
> * Data setup :noexport:
>
> #+begin_src R :session r
>
> load libraries
> read data files
> do universal operations
>
> #+end_src
>
> * Slide
>
> #+begin_src R :session r :exports results :results output graphics
>
> subset(larger_data_set_from_above)
> processing
> plot something
>
> #+end_src
>
> I noticed today that my :noexport: setup sections (I had a couple)
> were not updating. I re-defined a variable name further down in my
> file and it was re-using the definition from an above setup section
> (tagged with :noexport:). Just because I don't want it export doesn't
> mean I don't want to have useful stuff in the headline...
>
> Is this a bug/inappropriate setting, desirable based on how others use
> :noexport: headlines, or would others see value in executing babel
> blocks in :noexport: headlines?
>
> If I /didn't/ want it executed, I'd use :execute no.
>
>
> Thanks for any input,
> John
>
Instead of tagging the headline as :noexport: you can add the COMMENT
flag to it. This should result in your desired behavior. See the
attached example.
#+Title: example
* COMMENT not exported but run
#+name: the-date
#+begin_src sh
date
#+end_src
* exported and able to call into un-exported subtrees
The date today is,
#+call: the-date()
--
Eric Schulte
http://cs.unm.edu/~eschulte