summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-03-05 23:35:09 +0100
committerBastien Guerry <bzg@altern.org>2011-03-05 23:35:09 +0100
commitcde08b138ef87b6142d8680ce8ee9f1015e13150 (patch)
tree0290d72ee8865fd7af806db704ab98325bad7fd7
parentcc44c2b30a60d3201b604376af08e27707dd23ee (diff)
downloadorg-mode-cde08b138ef87b6142d8680ce8ee9f1015e13150.tar.gz
New variable `org-export-table-remove-empty-lines'.
* org-exp.el (org-export-table-remove-empty-lines): New custom variable. (org-export-remove-special-table-lines): Use it. This was requested by Eric S Fraga.
-rw-r--r--lisp/org-exp.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 5f0ae5d..85d43c5 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -560,6 +560,13 @@ the values of constants may be useful to have."
:group 'org-export-tables
:type 'boolean)
+(defcustom org-export-table-remove-empty-lines t
+ "Remove empty lines when exporting tables.
+This is the global equivalent of the :remove-nil-lines option
+when locally sending a table with #+ORGTBL."
+ :group 'org-export-tables
+ :type 'boolean)
+
(defcustom org-export-prefer-native-exporter-for-tables nil
"Non-nil means always export tables created with table.el natively.
Natively means use the HTML code generator in table.el.
@@ -1909,7 +1916,7 @@ When it is nil, all comments will be removed."
(defun org-export-remove-special-table-lines ()
"Remove tables lines that are used for internal purposes.
-Also, store forcedalignment information found in such lines."
+Also, store forced alignment information found in such lines."
(goto-char (point-min))
(while (re-search-forward "^[ \t]*|" nil t)
(org-if-unprotected-at (1- (point))
@@ -1920,7 +1927,7 @@ Also, store forcedalignment information found in such lines."
nil
(mapcar
(lambda (f)
- (or (= (length f) 0)
+ (or (and org-export-table-remove-empty-lines (= (length f) 0))
(string-match
"\\`<\\([0-9]\\|[lrc]\\|[lrc][0-9]+\\)>\\'" f)))
(org-split-string ;; FIXME, can't we do without splitting???