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 c678059deb
commit dd7ba333a7
1 changed files with 7 additions and 6 deletions

View File

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