From: tsd@tsdye.com (Thomas S. Dye)
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: including the result of a block in several places?
Date: Sat, 08 Dec 2012 06:57:57 -1000 [thread overview]
Message-ID: <m1boe4zdka.fsf@tsdye.com> (raw)
In-Reply-To: <m2d2ykn95s.fsf@top-wifi.irisa.fr> (Alan Schmitt's message of "Sat, 08 Dec 2012 11:13:51 +0100")
Aloha Alan,
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> 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
next prev parent reply other threads:[~2012-12-08 16:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 16:16 including the result of a block in several places? Alan Schmitt
2012-12-07 18:26 ` Sebastien Vauban
2012-12-08 10:13 ` Alan Schmitt
2012-12-08 16:57 ` Thomas S. Dye [this message]
2012-12-10 8:57 ` Alan Schmitt
2012-12-10 9:57 ` Sebastien Vauban
2012-12-10 10:17 ` Alan Schmitt
2012-12-10 14:58 ` Eric Schulte
2012-12-10 16:14 ` Alan Schmitt
2012-12-10 19:32 ` Alan Schmitt
2012-12-10 19:43 ` Thomas S. Dye
2012-12-11 7:48 ` Alan Schmitt
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=m1boe4zdka.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
/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).