emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lawrence Bottorff <borgauf@gmail.com>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Babel: How to call code in one org file into another org file
Date: Sat, 31 Oct 2015 02:12:20 +0000	[thread overview]
Message-ID: <CAFAhFSU-i8GbanaK6GGPM53X7p++p-LteZOrk_tH+Kz6h28xLA@mail.gmail.com> (raw)
In-Reply-To: <m21tcbx2iy.fsf@andrew.cmu.edu>

[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]

In my init file I have

(custom-set-variables
  . . .
   '(org-babel-lob-files
   (quote
    ("/home/hercynian/org/babeltest/a.org" "/home/hercynian/org/babeltest/
b.org")))

that, of course, lasted an Emacs reboot after I had set them with
customization. But then right after Emacs reboot, looking into the contents
of `org-babel-library-of-babel`, I do not see the "association list" of the
entire code blocks of a.org and b.org as I did in the last Emacs/org-mode
session when I ran `org-babel-lob-ingest` on a.org and b.org. So
`org-babel-library-of-babel` is populated only
through `org-babel-lob-ingest`. Next question was, Does code alive in the
current `org-babel-library-of-babel` make it live and ready to use?
Apparently not. Experimenting has shown that starting Emacs not only does
not auto-populate `org-babel-library-of-babel`, but even when I do
a `org-babel-lob-ingest` on a.org and b.org, SLIME takes no notice and
fails to see the functions in a.org and b.org.

Here's my `org-babel-library-of-babel`:

Value: ((multi_x2 "lisp" "(defun multi_x2 (x)\n  (* 2 x))"
           ((:comments . "")
            (:shebang . "")
            (:cache . "no")
            (:padline . "")
            (:noweb . "no")
            (:tangle . "no")
            (:exports . "code")
            (:results . "replace")
            (:session)
            (:hlines . "no"))
           "" "multi_x2" 0 18)
 (myadd "lisp" "(defun myadd (x y)\n  (+ x y))"
        ((:comments . "")
         (:shebang . "")
         (:cache . "no")
         (:padline . "")
         (:noweb . "no")
         (:tangle . "no")
         (:exports . "code")
         (:results . "replace")
         (:session)
         (:hlines . "no"))
        "" "myadd" 0 15))

which seems like my code block in c.org should know about them, right? No.
Again, Babel LOB seems to have forgotten to tell SLIME the good news. But
then maybe I need to say something specific in my add&multi_x2 code block
about these helper functions I've got in a.org and b.org?

[-- Attachment #2: Type: text/html, Size: 3314 bytes --]

  parent reply	other threads:[~2015-10-31  2:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 20:21 Babel: How to call code in one org file into another org file Lawrence Bottorff
2015-10-30 20:53 ` John Kitchin
2015-10-30 20:55 ` Thomas S. Dye
2015-10-30 22:57   ` briangpowell .
2015-10-31  0:14   ` Lawrence Bottorff
     [not found]     ` <m21tcbx2iy.fsf@andrew.cmu.edu>
2015-10-31  2:12       ` Lawrence Bottorff [this message]
2015-10-31  2:15         ` Lawrence Bottorff
2015-10-31  3:08     ` Thomas S. Dye
2015-10-31  3:58       ` Lawrence Bottorff
2015-10-31 15:41         ` Nick Dokos
2015-10-31 16:17           ` Lawrence Bottorff
2015-10-31 16:34             ` Nick Dokos
2015-10-31 16:51               ` Lawrence Bottorff
2015-11-02  7:09                 ` Eric S Fraga
2015-11-02 13:36                   ` Nick Dokos
2015-10-31  9:57 ` Rasmus
  -- strict thread matches above, loose matches on Subject: below --
2015-10-31  2:24 John Kitchin
2015-10-31  2:33 ` Lawrence Bottorff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFAhFSU-i8GbanaK6GGPM53X7p++p-LteZOrk_tH+Kz6h28xLA@mail.gmail.com \
    --to=borgauf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).