Nick Dokos <ndo...@gmail.com> writes: > Nick Dokos <ndo...@gmail.com> writes: > >> Nothing - there is a bug in org-table.el:org-table-clean-before-export >> where the regexp that matches special chars in the first column (see >> >> (info "(org)Advanced features") >> >> for the details) inadvertently matches "| | | | 3900|" and deletes the >> first column. The regexp is set like this: >> >> (let ((special (if maybe-quoted >> "^[ \t]*| *\\\\?[\#!$*_^/ ] *|" >> "^[ \t]*| *[\#!$*_^/ ] *|")) >> >> > > Checking the list of special chars in the Advanced Features section > above, I see #!$*_^/ only - I'm not sure what the \ is doing in the > [...] character class. I propose getting rid of it as well as the space. > > Also, org-table-clean-before-export is called from two places in > org-table.el, neither of which uses the maybe-quoted argument[fn:1], so > I propose getting rid of it and the if clauses as well. Like this: > > diff --git a/lisp/org-table.el b/lisp/org-table.el > index 6d649ab..bfe396e 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 > > Any objections? > > Footnotes: > > [fn:1] I checked contrib as well and nobody uses it there either. Although > it's possible that somebody uses it out in the wild, I think it's > very unlikely. But if you do use it, let me know. > > Thanks,
I pushed this to maint and merged it into master. -- Nick