From a6720e38a35f9c8904fc19296c7b1a2fe438e720 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 21 Oct 2010 12:39:54 +0100 Subject: [PATCH] babel: tangle: Respond to changes in generic expansion function * ob-tangle.el (org-babel-tangle-collect-blocks): Supply variable assignment lines to generic expansion command --- lisp/ob-tangle.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index eb3760048..f07a3b88c 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -287,13 +287,15 @@ code blocks by language." current-heading block-counter)))) (src-lang (nth 0 info)) (expand-cmd (intern (concat "org-babel-expand-body:" src-lang))) + (assignments-cmd (intern (concat "org-babel-variable-assignments:" src-lang))) (body ((lambda (body) (if (assoc :no-expand params) body - (funcall (if (fboundp expand-cmd) - expand-cmd - 'org-babel-expand-body:generic) - body params))) + (if (fboundp expand-cmd) (funcall expand-cmd body params) + (org-babel-expand-body:generic + body params + (and (fboundp assignments-cmd) + (funcall assignments-cmd params)))))) (if (and (cdr (assoc :noweb params)) (let ((nowebs (split-string (cdr (assoc :noweb params)))))