Browse Source

ox: Fix void `org-table-number-fraction'

* lisp/ox.el (org-export-table-cell-alignment): Ensure required
  variables are available.

This error is triggered in ODT export with lists using :list-table
feature.  This creates tables as parsed data on the fly in the tree,
triggering call to `org-export-table-cell-alignment', but `org-table'
library may not be available.
Nicolas Goaziou 11 years ago
parent
commit
180d112334
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/ox.el

+ 2 - 0
lisp/ox.el

@@ -4515,6 +4515,8 @@ same column as TABLE-CELL.  If no such cookie is found, a default
 alignment value will be deduced from fraction of numbers in the
 column (see `org-table-number-fraction' for more information).
 Possible values are `left', `right' and `center'."
+  ;; Load `org-table-number-fraction' and `org-table-number-regexp'.
+  (require 'org-table)
   (let* ((row (org-export-get-parent table-cell))
 	 (table (org-export-get-parent row))
 	 (cells (org-element-contents row))