Noweb references can now be resolved from the library of babel.

* lisp/ob.el (org-babel-expand-noweb-references): Noweb references can
  now be resolved from the library of babel.
This commit is contained in:
Eric Schulte 2010-12-15 10:16:58 -07:00
parent e919c97d7e
commit f5f2851401
1 changed files with 21 additions and 19 deletions

View File

@ -1731,6 +1731,8 @@ block but are passed literally to the \"example-block\"."
(if evaluate
(let ((raw (org-babel-ref-resolve source-name)))
(if (stringp raw) raw (format "%S" raw)))
(or (nth 2 (assoc (intern source-name)
org-babel-library-of-babel))
(save-restriction
(widen)
(let ((point (org-babel-find-named-block
@ -1749,7 +1751,7 @@ block but are passed literally to the \"example-block\"."
"<<" source-name ">> "
"could not be resolved (see "
"`org-babel-noweb-error-langs')"))
"")))))
""))))))
"[\n\r]") (concat "\n" prefix)))))
(nb-add (buffer-substring index (point-max)))))
new-body))