emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-Babel Mode : a suggestion and a contribution article [Babel]
@ 2011-08-09 21:17 Feiming Chen
  2011-08-09 21:30 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Feiming Chen @ 2011-08-09 21:17 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 621 bytes --]

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 



#+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

[-- Attachment #1.2: Type: text/html, Size: 848 bytes --]

[-- Attachment #2: test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 639 bytes --]

[-- Attachment #3: test.html --]
[-- Type: text/html, Size: 4580 bytes --]

[-- Attachment #4: how-to-use-Org-Babel-for-R.html --]
[-- Type: text/html, Size: 11956 bytes --]

[-- Attachment #5: how-to-use-Org-Babel-for-R.org --]
[-- Type: application/vnd.lotus-organizer, Size: 5506 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-Babel Mode : a suggestion and a contribution article [Babel]
  2011-08-09 21:17 Org-Babel Mode : a suggestion and a contribution article [Babel] Feiming Chen
@ 2011-08-09 21:30 ` Nick Dokos
  2011-08-11 10:01 ` suvayu ali
  2011-08-17 13:32 ` Bastien
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2011-08-09 21:30 UTC (permalink / raw)
  To: Feiming Chen; +Cc: nicholas.dokos, emacs-orgmode

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:
> 
> ----------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-Babel Mode : a suggestion and a contribution article [Babel]
  2011-08-09 21:17 Org-Babel Mode : a suggestion and a contribution article [Babel] Feiming Chen
  2011-08-09 21:30 ` Nick Dokos
@ 2011-08-11 10:01 ` suvayu ali
  2011-08-17 13:32 ` Bastien
  2 siblings, 0 replies; 4+ messages in thread
From: suvayu ali @ 2011-08-11 10:01 UTC (permalink / raw)
  To: Feiming Chen; +Cc: emacs-orgmode

Hi Feiming,

On Tue, Aug 9, 2011 at 11:17 PM, Feiming Chen <feimingchen@yahoo.com> wrote:
>
> 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.

Have you looked at the community written documentation on Worg[1]?
Maybe you can improve it instead of writing a separate Howto?

[1] http://orgmode.org/worg/org-contrib/babel/index.html

--
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-Babel Mode : a suggestion and a contribution article [Babel]
  2011-08-09 21:17 Org-Babel Mode : a suggestion and a contribution article [Babel] Feiming Chen
  2011-08-09 21:30 ` Nick Dokos
  2011-08-11 10:01 ` suvayu ali
@ 2011-08-17 13:32 ` Bastien
  2 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2011-08-17 13:32 UTC (permalink / raw)
  To: Feiming Chen; +Cc: emacs-orgmode

Hi Feiming,

Feiming Chen <feimingchen@yahoo.com> writes:

> 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.

Are you willing to add this file to Worg?

  http://orgmode.org/worg/

It is useful to have as much tutorial as possible, even if 
there might be some overlap with existing content.

Let us know, and thanks for this contribution,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-17 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-09 21:17 Org-Babel Mode : a suggestion and a contribution article [Babel] Feiming Chen
2011-08-09 21:30 ` Nick Dokos
2011-08-11 10:01 ` suvayu ali
2011-08-17 13:32 ` Bastien

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).