From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Org-Babel Mode : a suggestion and a contribution article [Babel] Date: Tue, 09 Aug 2011 17:30:42 -0400 Message-ID: <6463.1312925442@alphaville.americas.hpqcorp.net> References: <1312924676.57195.YahooMailClassic@web81708.mail.mud.yahoo.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqtsv-0003dW-NO for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 17:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqtsq-0004rs-OT for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 17:30:49 -0400 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:46120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqtsq-0004rQ-Gz for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 17:30:44 -0400 In-Reply-To: Message from Feiming Chen of "Tue, 09 Aug 2011 14:17:56 PDT." <1312924676.57195.YahooMailClassic@web81708.mail.mud.yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Feiming Chen Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Feiming Chen 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: > > ----------------------------------------------------