emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] including the result of a block in several places?


From: Thomas S. Dye
Subject: Re: [O] including the result of a block in several places?
Date: Sat, 08 Dec 2012 06:57:57 -1000

Aloha Alan,

Alan Schmitt <address@hidden> writes:

> "Sebastien Vauban" <address@hidden> writes:
>
>> Hi Alan,
>>
>> Alan Schmitt wrote:
>>> I tried including the result of evaluation a block in several slides,
>>> but the second time it was not included.
>>>
>>> Is it possible to have the results of the evaluation of a block in
>>> several places?
>>
>> OOTB, I don't think so. However, you could have a code block which simply
>> copies the results.
>>
>> See `echo' in the `library-of-babel.org'.
>
> Nice suggestion, thanks a lot. According to the documentation, I can
> "call" functions from the library of babel from anywhere, but when I try
> this:
>
> #+begin_src org
> #+name: test
> #+begin_src perl
>    for (my $i = 0; $i != 10; ++i) {
>         print "hello, world!\n";
>    }
> #+end_src
> #+call: echo(test)
> #+end_src
>
> I get a "org-babel-ref-resolve: Reference 'echo' not found in this
> buffer".
>
> Do I need to do something special to load the library?

I've had these in my .emacs for quite a while and they seem to work:

** ON Load Standard Library of Babel
#+begin_src emacs-lisp :tangle yes
  (org-babel-lob-ingest 
"~/.emacs.d/src/org-mode/contrib/babel/library-of-babel.org")
#+end_src

** ON Load Local Library of Babel
#+begin_src emacs-lisp :tangle yes
  (org-babel-lob-ingest "~/org/td-lob.org")
#+end_src

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

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