Function: org-babel-lob-ingest
org-babel-lob-ingest is an interactive and byte-compiled function
defined in ob-lob.el.gz.
Signature
(org-babel-lob-ingest &optional FILE)
Documentation
Add all named source blocks defined in FILE to org-babel-library-of-babel.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-lob.el.gz
(defun org-babel-lob-ingest (&optional file)
"Add all named source blocks defined in FILE to `org-babel-library-of-babel'."
(interactive "fFile: ")
(let ((lob-ingest-count 0))
(org-babel-map-src-blocks file
(let* ((info (org-babel-get-src-block-info 'no-eval))
(source-name (nth 4 info)))
(when source-name
(setf (nth 1 info)
(if (org-babel-noweb-p (nth 2 info) :eval)
(org-babel-expand-noweb-references info)
(nth 1 info)))
(let ((source (intern source-name)))
(setq org-babel-library-of-babel
(cons (cons source info)
(assq-delete-all source org-babel-library-of-babel))))
(cl-incf lob-ingest-count))))
(message "%d source block%s added to Library of Babel"
lob-ingest-count (if (> lob-ingest-count 1) "s" ""))
lob-ingest-count))