mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-21 09:48:39 +00:00
Library of Babel should only try to ingest named source blocks
This commit is contained in:
parent
c678059deb
commit
dd7ba333a7
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue