babel: allow disabling of noweb expansion during tangling

This commit is contained in:
Dan Davison 2010-04-08 12:10:25 -04:00
parent 38d6bf3f6c
commit 0f83b2d203
1 changed files with 3 additions and 1 deletions

View File

@ -172,8 +172,10 @@ code blocks by language."
(source-name (intern (or (fifth info)
(format "block-%d" block-counter))))
(src-lang (first info))
(body (org-babel-expand-noweb-references info))
(params (third info))
(body (if (equal "no" (cdr (assoc :noweb params)))
(second info)
(org-babel-expand-noweb-references info)))
(spec (list link source-name params body (third (cdr (assoc src-lang org-babel-tangle-langs)))))
by-lang)
(unless (string= (cdr (assoc :tangle params)) "no") ;; maybe skip