From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: including the result of a block in several places? Date: Sat, 08 Dec 2012 06:57:57 -1000 Message-ID: References: <8038zh3eil.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThNjP-0000L7-B3 for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 11:58:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThNjO-0004W3-1v for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 11:58:27 -0500 Received: from oproxy8-pub.bluehost.com ([69.89.22.20]:47371) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ThNjN-0004Vs-Pz for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 11:58:25 -0500 In-Reply-To: (Alan Schmitt's message of "Sat, 08 Dec 2012 11:13:51 +0100") 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: Alan Schmitt Cc: emacs-orgmode@gnu.org Aloha Alan, Alan Schmitt writes: > "Sebastien Vauban" 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