From 4cf9de5ea0c545c1143001de432f71052fa9c3f8 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 9 Nov 2011 14:11:24 -0700 Subject: [PATCH] don't disassemble tables twice on export * lisp/ob.el (org-babel-process-params): Don't disassemble tables twice. --- lisp/ob.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index d94b4b6df..37fab74e6 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1170,14 +1170,19 @@ shown below. (defun org-babel-process-params (params) "Expand variables in PARAMS and add summary parameters." - (let* ((vars-and-names (org-babel-disassemble-tables - (mapcar (lambda (el) - (if (consp (cdr el)) - (cdr el) (org-babel-ref-parse (cdr el)))) - (org-babel-get-header params :var)) - (cdr (assoc :hlines params)) - (cdr (assoc :colnames params)) - (cdr (assoc :rownames params)))) + (let* ((vars-and-names (if (and (assoc :colname-names params) + (assoc :rowname-names params)) + (list (mapcar #'cdr + (org-babel-get-header params :var))) + (org-babel-disassemble-tables + (mapcar (lambda (el) + (if (consp (cdr el)) + (cdr el) + (org-babel-ref-parse (cdr el)))) + (org-babel-get-header params :var)) + (cdr (assoc :hlines params)) + (cdr (assoc :colnames params)) + (cdr (assoc :rownames params))))) (raw-result (or (cdr (assoc :results params)) "")) (result-params (append (split-string (if (stringp raw-result) -- 2.11.4.GIT