Does export and correctly resolves the variable in the :noexport:'d section resulting in the following output. ,---- | noexport | ======== | | Author: Eric Schulte | Date: 2011-08-23 17:37:28 MDT | | | Table of Contents | ================= | 1 top | 1.1 to be exported | | | 1 top | ------ | | 1.1 to be exported | =================== | | | 3 | `---- > > This is probably caused by org-export-preprocess-string: it does things > in a certain order, and it probably kills the :noexport: stuff before it > gets to the evaluation of the source block. > > It might be possible to change the order (ISTR a couple of cases, where > behavior was changed by doing exactly this), but it's probably fraught with > peril: approach with caution. > The above analysis is correct. Babel has to deal with this when resolving header arguments, noweb references and variable expansions. It does this by resolving these things in the original org-mode buffer rather than in the temporary export buffer which is often missing portions which are not to be exported. See the definition of the `org-babel-exp-in-export-file' macro for details. Best -- Eric > > Nick > > PS. Warning: the above is a guess: it may have nothing to do with reality. > -- Eric Schulte http://cs.unm.edu/~eschulte/