From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Babel: How to call code in one org file into another org file Date: Sat, 31 Oct 2015 12:34:04 -0400 Message-ID: <87bnbf80ar.fsf@pierrot.dokosmarshall.org> References: <87oaff82pv.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsZ6i-0004AT-43 for emacs-orgmode@gnu.org; Sat, 31 Oct 2015 12:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsZ6e-0005du-U4 for emacs-orgmode@gnu.org; Sat, 31 Oct 2015 12:34:20 -0400 Received: from plane.gmane.org ([80.91.229.3]:45881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsZ6e-0005dq-Nm for emacs-orgmode@gnu.org; Sat, 31 Oct 2015 12:34:16 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZsZ6d-00064I-Cn for emacs-orgmode@gnu.org; Sat, 31 Oct 2015 17:34:15 +0100 Received: from pool-108-20-41-232.bstnma.fios.verizon.net ([108.20.41.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2015 17:34:15 +0100 Received: from ndokos by pool-108-20-41-232.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2015 17:34:15 +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: emacs-orgmode@gnu.org Lawrence Bottorff writes: > Yes, I experimented with this too -- and got it to work. But strangely, if you leave out the  > > # eval: (org-babel-lob-ingest "./a.org") > # eval: (org-babel-lob-ingest "./b.org") > > lines and do a regular `org-babel-lob-ingest` (or  C-c C-v i) on those > two files -- it doesn't work. Rather bizarre behavior, IMHO. > I think you have some misconceptions about what org-babel-lob-ingest does. All it does is go through the file and add the named source blocks in that file to org-babel-library-of-babel: it does *not* evaluate the code blocks. So if the code block is e.g. a lisp code block with a defun in it, the function is *not* defined, until the code block is evaluated by org-babel: that's what org-sbe does. > Anyway, the dream behavior for LOB would be to simply add your files to your `org-babel-lob-files` in your Emacs init, start up an org file -- and be able to simply use all the LOB > files in your "live" `org-babel-library-of-babel` list library. > You can do that but again all that does is populate a list that only org-babel knows about. You'd still need to evaluate the code blocks in order to tell the inferior lisp process about what the code block define. -- Nick