From f07929f5f12c892b663c9f813725b65e724de6c1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 20 Feb 2012 16:37:25 +0100 Subject: [PATCH] org-e-ascii: Fix column width with cells containing an object not exported * EXPERIMENTAL/org-e-ascii.el (org-e-ascii-table): width may be wrong when some object is removed from a cell during export --- EXPERIMENTAL/org-e-ascii.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/EXPERIMENTAL/org-e-ascii.el b/EXPERIMENTAL/org-e-ascii.el index 2b81f6b55..c2eb6a1ab 100644 --- a/EXPERIMENTAL/org-e-ascii.el +++ b/EXPERIMENTAL/org-e-ascii.el @@ -1626,20 +1626,20 @@ CONTENTS is nil. INFO is a plist holding contextual information." (alignment (plist-get table-info :alignment)) (clean-table (org-export-clean-table raw-table special-col-p)) ;; Change table into lisp, much like - ;; `org-table-to-lisp', being more careful about keeping - ;; the exact length of cells, for alignment purpose. - ;; Cells are parsed and transcoded along the way. + ;; `org-table-to-lisp', though cells are parsed and + ;; transcoded along the way. (lisp-table (mapcar (lambda (line) (if (string-match org-table-hline-regexp line) 'hline (mapcar (lambda (cell) - (org-export-secondary-string - (org-element-parse-secondary-string - cell - (cdr (assq 'item org-element-string-restrictions))) - 'e-ascii info)) + (org-trim + (org-export-secondary-string + (org-element-parse-secondary-string + cell + (cdr (assq 'item org-element-string-restrictions))) + 'e-ascii info))) (org-split-string (org-trim line) "\\s-?|\\s-?")))) (org-split-string clean-table "[ \t]*\n[ \t]*"))) ;; Compute real column widths.