From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Babel: How to call code in one org file into another org file Date: Fri, 30 Oct 2015 20:21:53 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3eebca7315d0523582d47 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGBQ-0004IG-09 for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 16:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsGBP-0006RA-0P for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 16:21:56 -0400 Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:33403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGBO-0006Qx-Oq for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 16:21:54 -0400 Received: by lfbf136 with SMTP id f136so24568977lfb.0 for ; Fri, 30 Oct 2015 13:21:53 -0700 (PDT) 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: emacs-orgmode Mailinglist --001a11c3eebca7315d0523582d47 Content-Type: text/plain; charset=UTF-8 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 LB --001a11c3eebca7315d0523582d47 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 possib= le? I know you can stick stuff into your personal "Library of Babel,&q= uot; but I just want to write a Lisp block that calls a function from anoth= er org file. I'll have SLIME running, of course.

...
=
=C2=A0#+begin_src lisp
(defun foo ()
=C2=A0 = =C2=A0(...))
#+end_src

is then calle= d from. . .

...
#+begin_src lisp
(defun baa ()<= /div>
=C2=A0 (foo))
#+end_src

LB
--001a11c3eebca7315d0523582d47--