Re: [O] Tangle only code block body

2012-02-25 Thread Eric Schulte
Hi Ista,

Use the :no-expand header argument. See
http://orgmode.org/manual/no_002dexpand.html

Best,

Ista Zahn istaz...@gmail.com writes:

 Hi all,

 Is there a way to tangle just the body of code blocks, without any header 
 argurments? For example when I tangle this file

 # begin example #

 * test
 #+name: testplot
 #+begin_src R :results output graphics :file tmp.png :tangle tmp.R
   plot(1:10)
 #+end_src

 # end example #

 I get

 png(filename=tmp.png)
 plot(1:10)
 dev.off()

 but I want just

 plot(1:10)


 I've tried removing the %flag setting in org-babel-exp-code-template but it 
 didn't seem to have any effect. 

 Thanks for any pointers,

 Ista




-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] Tangle only code block body

2012-02-18 Thread Ista Zahn
Hi all,

Is there a way to tangle just the body of code blocks, without any header 
argurments? For example when I tangle this file

# begin example #

* test
#+name: testplot
#+begin_src R :results output graphics :file tmp.png :tangle tmp.R
  plot(1:10)
#+end_src

# end example #

I get

png(filename=tmp.png)
plot(1:10)
dev.off()

but I want just

plot(1:10)


I've tried removing the %flag setting in org-babel-exp-code-template but it 
didn't seem to have any effect. 

Thanks for any pointers,

Ista