Browse Source

Library of Babel should only try to ingest named source blocks

Eric Schulte 16 years ago
parent
commit
3920102905
1 changed files with 7 additions and 6 deletions
  1. 7 6
      lisp/org-babel-lob.el

+ 7 - 6
lisp/org-babel-lob.el

@@ -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"