I think the approach I sent earlier would potentially work. essentially you would get the html code and wrap it with whatever text is required for the folding mode. you would return something like (format "%s" text) where text is the html code from the src block. In latex I had to parse that text a little bit because the first line was \begin{minted}... and the last line was \end{minted}, which I did not want. John ----------------------------------- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Thu, Sep 26, 2013 at 2:31 PM, Cook, Malcolm wrote: > >Check out `org-export-filter-src-block-functions'. It shouldn't be too > >hard to add a custom filter to that list which may be used to process > >all code block bodies during latex export. > > Somewhat off-topic, but, thanks for pointing out this variable Eric.... > I've been wanting an approach that would wrap all exported code in some > kind of folded mode (maybe a jquery accordion). Initially the html > document by default would display only exported 'results'. The user could > choose to display the code behind any result with a single click (keyboard > interactivity would be even better). Do you think that this is the right > 'hook' to apply such? Have you seen this already done better somewhere? > > ~ Malcolm Cook > > > > >Best, > > > >-- > >Eric Schulte > >https://cs.unm.edu/~eschulte > >PGP: 0x614CA05D > >