emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Feiming Chen <feimingchen@yahoo.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Org-Babel Mode : a suggestion and a contribution article [Babel]
Date: Tue, 09 Aug 2011 17:30:42 -0400	[thread overview]
Message-ID: <6463.1312925442@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Feiming Chen <feimingchen@yahoo.com> of "Tue, 09 Aug 2011 14:17:56 PDT." <1312924676.57195.YahooMailClassic@web81708.mail.mud.yahoo.com>

Feiming Chen <feimingchen@yahoo.com> 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	other threads:[~2011-08-09 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 21:17 Org-Babel Mode : a suggestion and a contribution article [Babel] Feiming Chen
2011-08-09 21:30 ` Nick Dokos [this message]
2011-08-11 10:01 ` suvayu ali
2011-08-17 13:32 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6463.1312925442@alphaville.americas.hpqcorp.net \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=feimingchen@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).