1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-18 10:17:03 +00:00

Library of Babel should only try to ingest named source blocks

This commit is contained in:
Eric Schulte 2009-06-15 12:54:29 -07:00
parent 9e5f634135
commit 3920102905

View File

@ -48,12 +48,13 @@ add files to this list use the `org-babel-lob-ingest' command."
(org-babel-map-source-blocks file
(let ((source-name (intern (org-babel-get-src-block-name)))
(info (org-babel-get-src-block-info)))
;; remove :var elements from params
;; (once we have a better way of combining parameter lists then we won't have to do this)
(setf (third info) (assq-delete-all :var (third info)))
(setq org-babel-library-of-babel
(cons (cons source-name info)
(assq-delete-all source-name org-babel-library-of-babel))))))
(when source-name
;; remove :var elements from params
;; (once we have a better way of combining parameter lists then we won't have to do this)
(setf (third info) (assq-delete-all :var (third info)))
(setq org-babel-library-of-babel
(cons (cons source-name info)
(assq-delete-all source-name org-babel-library-of-babel)))))))
(org-babel-lob-ingest ;; actually add the source-blocks defined in library-of-babel.org
(expand-file-name "library-of-babel.org"