|
@@ -2760,14 +2760,16 @@ block but are passed literally to the \"example-block\"."
|
|
|
(if org-babel-use-quick-and-dirty-noweb-expansion
|
|
|
(while (re-search-forward rx nil t)
|
|
|
(let* ((i (org-babel-get-src-block-info 'light))
|
|
|
- (body (org-babel-expand-noweb-references i))
|
|
|
+ (body (if (org-babel-noweb-p (nth 2 i) :eval)
|
|
|
+ (org-babel-expand-noweb-references i)
|
|
|
+ (nth 1 i)))
|
|
|
(sep (or (cdr (assq :noweb-sep (nth 2 i)))
|
|
|
"\n"))
|
|
|
(full (if comment
|
|
|
(let ((cs (org-babel-tangle-comment-links i)))
|
|
|
- (concat (funcall c-wrap (car cs)) "\n"
|
|
|
- body "\n"
|
|
|
- (funcall c-wrap (cadr cs))))
|
|
|
+ (concat (funcall c-wrap (car cs)) "\n"
|
|
|
+ body "\n"
|
|
|
+ (funcall c-wrap (cadr cs))))
|
|
|
body)))
|
|
|
(setq expansion (cons sep (cons full expansion)))))
|
|
|
(org-babel-map-src-blocks nil
|
|
@@ -2776,7 +2778,9 @@ block but are passed literally to the \"example-block\"."
|
|
|
(when (equal (or (cdr (assq :noweb-ref (nth 2 i)))
|
|
|
(nth 4 i))
|
|
|
source-name)
|
|
|
- (let* ((body (org-babel-expand-noweb-references i))
|
|
|
+ (let* ((body (if (org-babel-noweb-p (nth 2 i) :eval)
|
|
|
+ (org-babel-expand-noweb-references i)
|
|
|
+ (nth 1 i)))
|
|
|
(sep (or (cdr (assq :noweb-sep (nth 2 i)))
|
|
|
"\n"))
|
|
|
(full (if comment
|