On Tue, Aug 21, 2012 at 01:34:16AM -0400, Nick Dokos wrote:
> Rick Frankel <r...@rickster.com> wrote:
> 
> > On Tue, Aug 21, 2012 at 12:54:25AM +0200, Nicolas Goaziou wrote:
> > > Hello,
> > > 
> > > Use something like the following.
> > > 
> > > * Test width attribute
> > > #+NAME: graph
> > > #+begin_src dot :file t.png 
> > >   digraph g { a -> b }
> > > #+end_src
> > > 
> > > #+ATTR_LATEX: width=3in
> > > #+RESULTS: graph
> > > [[file:t.png]]
> > > 

> Named source blocks will refresh the corresponding named results blocks
> anywhere in the file: they don't produce a new set each time they are
> executed and it doesn't matter whether they are "disconnected". I'm not
> sure how far back this behavior goes, but it is how current (well,
> slightly out-of-date but not too much) master-branch org behaves.
> 

Yes. IF the source block is named, the results block will be
replaced regardless of where it lives in the file, so adding
attributes above the results block works.

BUT, if the source block is not named then a duplicate results will be
created above the current results block w/ the attribute header when
the source block is re-evaluated.

I guess it's acceptable to require all source blocks to be named if
you want to have header attributes associated with the generated
results, but this is a significant incompatible change from the
behavior of the current exporter...

rick

Reply via email to