mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
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
This commit is contained in:
parent
a5beff869f
commit
79873390ed
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user