From 79873390edd26a44cefc2050c7af470a7ed8fd07 Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Fri, 18 Jul 2014 09:09:38 -0400 Subject: [PATCH] org-clean-before-export matches non-special columns spuriously * org-table.el (org-table-clean-before-export): The regexes match spaces in addition to the special characters that might be used in the first column as special marking characters. Remove the space from the character class. In addition, the `special' variable included a backslash which afaict does nothing: delete it. The function itself takes an optional parameter which is not used by any of the callers: get rid of it. Getting rid of it allows a small simplification of the code. The bug was found by Thorsten Grothe: http://thread.gmane.org/gmane.emacs.orgmode/88634 --- lisp/org-table.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index 6d649ab16..bfe396e34 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -436,15 +436,11 @@ available parameters." "[ \t]*|[ \t]*"))))))) (defvar org-table-clean-did-remove-column nil) ; dynamically scoped -(defun org-table-clean-before-export (lines &optional maybe-quoted) +(defun org-table-clean-before-export (lines) "Check if the table has a marking column. If yes remove the column and the special lines." - (let ((special (if maybe-quoted - "^[ \t]*| *\\\\?[\#!$*_^/ ] *|" - "^[ \t]*| *[\#!$*_^/ ] *|")) - (ignore (if maybe-quoted - "^[ \t]*| *\\\\?[!$_^/] *|" - "^[ \t]*| *[!$_^/] *|"))) + (let ((special "^[ \t]*| *[#!$*_^/] *|") + (ignore "^[ \t]*| *[!$_^/] *|")) (setq org-table-clean-did-remove-column (not (memq nil (mapcar