From mboxrd@z Thu Jan 1 00:00:00 1970 From: "briangpowell ." Subject: Re: Babel: How to call code in one org file into another org file Date: Fri, 30 Oct 2015 18:57:59 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ce9d8eaa0a705235a5b0c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsIcT-00025p-U8 for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 18:58:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsIcS-0003sU-Ir for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 18:58:01 -0400 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:36498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsIcS-0003sH-EM for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 18:58:00 -0400 Received: by oiao187 with SMTP id o187so67871853oia.3 for ; Fri, 30 Oct 2015 15:57:59 -0700 (PDT) In-Reply-To: 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: "Thomas S. Dye" Cc: emacs-orgmode Mailinglist , Lawrence Bottorff --001a113ce9d8eaa0a705235a5b0c Content-Type: text/plain; charset=UTF-8 Could create a named pipe and have one org-mode file write to it and another org-mode file read from it. On Fri, Oct 30, 2015 at 4:55 PM, Thomas S. Dye wrote: > Aloha Lawrence, > > Lawrence Bottorff writes: > > > There are many, many Babel examples, but I can't seem to find this > > functionality: A function in a Lisp code block in one org file is to be > > called from a Lisp code block in another org file. Is this possible? I > know > > you can stick stuff into your personal "Library of Babel," but I just > want > > to write a Lisp block that calls a function from another org file. I'll > > have SLIME running, of course. > > > > > > file1.org: > > ... > > #+begin_src lisp > > (defun foo () > > (...)) > > #+end_src > > > > is then called from. . . > > > > file2.org: > > ... > > #+begin_src lisp > > (defun baa () > > (foo)) > > #+end_src > > Any Org mode file can function as Library of Babel. In your case, > (org-babel-lob-ingest path/to/file1.org) should do what you want. Note > that org-babel-lob-ingest is bound to C-c C-v i. > > hth, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com > > --001a113ce9d8eaa0a705235a5b0c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Could create a named pipe and have one org-mode file write= to it and another org-mode file read from it.

On Fri, Oct 30, 2015 at 4:55 PM, Thomas = S. Dye <tsd@tsdye.com> wrote:
= Aloha Lawrence,

Lawrence Bottorff <borgauf@gmail.co= m> writes:

> There are many, many Babel examples, but I can't seem to find this=
> functionality: A function in a Lisp code block in one org file is to b= e
> called from a Lisp code block in another org file. Is this possible? I= know
> you can stick stuff into your personal "Library of Babel," b= ut I just want
> to write a Lisp block that calls a function from another org file. I&#= 39;ll
> have SLIME running, of course.
>
>
> file= 1.org:
> ...
>=C2=A0 #+begin_src lisp
> (defun foo ()
>=C2=A0 =C2=A0 (...))
> #+end_src
>
> is then called from. . .
>
> file= 2.org:
> ...
> #+begin_src lisp
> (defun baa ()
>=C2=A0 =C2=A0(foo))
> #+end_src

Any Org mode file can function as Library of Babel.=C2=A0 In your ca= se,
(org-babel-lob-ingest path/to/file1.org) should do what you want.=C2=A0 Note
that org-babel-lob-ingest is bound to C-c C-v i.

hth,
Tom

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


--001a113ce9d8eaa0a705235a5b0c--