emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Cannot use #+call correctly with babel
@ 2012-06-16 16:31 Benoit Bayol
  2012-06-17 18:42 ` William LÉCHELLE
  0 siblings, 1 reply; 2+ messages in thread
From: Benoit Bayol @ 2012-06-16 16:31 UTC (permalink / raw)
  To: emacs-orgmode

Hello everyone,

I cannot understand the way to use #+name and #+call with babel.

All the mixes on headers I tried have been failures.
I just want something like :

* Hello Word in C++
Here is the source code :
#+call: cpp_hello_world [:exports code]
and here is the result :
#+call: cpp_hello_world [:results output :exports results]

gives me

* Hello Word in C++
Here is the source code :
#include <iostream>

int main()
{
std::cout << "hello world !" << std::endl;
}

and here is the result :
Hello World !

in the resulting HTML, ascii or Latex export.

Here is my example source : http://pastebin.com/63uHDvZH

Does anyone see why I cannot have the output of the code and the results 
in the last sections ?

Thanks :)

-- 
Benoît BAYOL
benoit.bayol@gmail.com
0033 6 3353 1153

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

* Re: Cannot use #+call correctly with babel
  2012-06-16 16:31 Cannot use #+call correctly with babel Benoit Bayol
@ 2012-06-17 18:42 ` William LÉCHELLE
  0 siblings, 0 replies; 2+ messages in thread
From: William LÉCHELLE @ 2012-06-17 18:42 UTC (permalink / raw)
  To: emacs-orgmode

At Sat, 16 Jun 2012 18:31:53 +0200,
Benoit Bayol wrote:
> 
> All the mixes on headers I tried have been failures.
> 
> Here is my example source : http://pastebin.com/63uHDvZH
> 
> Does anyone see why I cannot have the output of the code and the results 
> in the last sections ?

Hi Benoit,

I may be wrong, but I ran into problems with #+call-s and header positions
also recently, and most of it was solved when I understood the manual

> #+CALL: <name>(<arguments>)

required the empty parenthesis() even if no argument were provided.

I now use :
#+CALL: name-of-block[:results output]() :results replace

So maybe you lack parenthesis (or maybe I misunderstood it), and maybe you
should try to put your headers in <end header arguments>, after the
parenthesis.

HTH,

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

end of thread, other threads:[~2012-06-17 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-16 16:31 Cannot use #+call correctly with babel Benoit Bayol
2012-06-17 18:42 ` William LÉCHELLE

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