From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: Babel: How to call code in one org file into another org file Date: Sat, 31 Oct 2015 03:58:30 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11401f0ea8fd0105235e8edf Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsNJI-00078v-RF for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 23:58:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsNJH-0002Uh-UN for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 23:58:32 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:33070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsNJH-0002Ud-Mh for emacs-orgmode@gnu.org; Fri, 30 Oct 2015 23:58:31 -0400 Received: by lfbf136 with SMTP id f136so29097674lfb.0 for ; Fri, 30 Oct 2015 20:58:30 -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 --001a11401f0ea8fd0105235e8edf Content-Type: text/plain; charset=UTF-8 > > > I would use local variables for this--something like (untested): > > # eval: (org-babel-lob-ingest path/to/your/file) > # eval: (sbe "my-add") > # eval: (sbe "multi_x2") > > Computer savvy Org moders don't like eval because anything can happen, > but if you're willing to trust yourself, then it shouldn't cause any > problems. > > With this near the bottom of your file, whenever you open the file your > other org files will be loaded into the Library of Babel where you can > load up function definitions as needed. > > Of course, you'll need to have slime running when you open the file. > > hth, > Tom > Thanks Tom. Still, I'm wondering if the whole LOB is worth it in Lisp/SLIME-land. I can load code with org-babel-lob-ingest into `org-babel-library-of-babel`, but SLIME doesn't seem to know about it -- which sort of defeats the whole purpose, if you follow what I mean. . . . --001a11401f0ea8fd0105235e8edf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I would use local variables for th= is--something like (untested):

# eval: (org-babel-lob-ingest path/to/your/file)
# eval: (sbe "my-add")
# eval: (sbe "multi_x2")

Computer savvy Org moders don't like eval because anything can happen,<= br> but if you're willing to trust yourself, then it shouldn't cause an= y
problems.

With this near the bottom of your file, whenever you open the file your
other org files will be loaded into the Library of Babel where you can
load up function definitions as needed.

Of course, you'll need to have slime running when you open the file.

hth,
Tom

Thanks Tom. Still, I= 9;m wondering if the whole LOB is worth it in Lisp/SLIME-land. I can load c= ode with org-babel-lob-ingest into `org-babel-library-of-babel`, but SLIME = doesn't seem to know about it -- which sort of defeats the whole purpos= e, if you follow what I mean. . . .=C2=A0
--001a11401f0ea8fd0105235e8edf--