emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org-Babel Mode : a suggestion and a contribution article [Babel]


From: Nick Dokos
Subject: Re: [O] Org-Babel Mode : a suggestion and a contribution article [Babel]
Date: Tue, 09 Aug 2011 17:30:42 -0400

Feiming Chen <address@hidden> wrote:

> I wonder if it is possible to use the macro option (#+MACRO:) to save
> the typing of header options (of code blocks).  For example, currently
> it does NOT work if I try to use
>                                                                               
>                                                                               
>                                                                               
>                                 

If you read the appropriate section of the manual

(info "(org)Macro replacement")

you will find that

"...
   Macro expansion takes place during export, and some people use it to
construct complex HTML code.
"
so no: you cannot use it for the purpose you describe. Look into various
abbreviation expanders (a lot of people here like yasnippets) or into
the simple abbrev expansion mechanism that org itself provides:

(info "(org)Easy templates")

Nick


> #+MACRO: p  :file $1.png :width 1000 :height 800                              
>                                                                               
>                                                                               
>                                 
>                                                                               
>                                                                               
>                                                                               
>                                 
> to shorten the header of a code block to                                      
>                                                                               
>                                                                               
>                                 
>                                                                               
>                                                                               
>                                                                               
>                                 
> #+begin_src R {{{p(plot)}}}                                                   
>                                                                               
>                                                                               
>                                 
>                                                                               
>                                                                               
>                                                                               
>                                 
> Anyway,  I found Org-Babel Mode to be a great tool since Sweave for writing R 
> literate program document.   I wrote a how-to article on its use (see 
> attached file "how-to-use-*.html", other files are raw and support files).  
> Hopefully it can be useful to some users. 
>                                                                               
>                                                                               
>                                                                               
>                                 
> Sincerely,                                                                    
>                                                                               
>                                                                               
>                                 
> Feiming Chen                                                                  
>                                                                               
>                                                                               
>                                 
> 
> 
> ----------------------------------------------------
> Alternatives:
> 
> ----------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]