diff --git a/doc/org.texi b/doc/org.texi index 2bdce9113..dfdc5ecc9 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -15551,6 +15551,10 @@ calculation marks, that column is automatically discarded as well. Please note that the translator function sees the table @emph{after} the removal of these columns, the function never knows that there have been additional columns. + +@item :no-escape t +When non-nil, do not escape special characters @code{&%#_^} when exporting +the table. The default value is nil. @end table @noindent diff --git a/lisp/org-table.el b/lisp/org-table.el index 305fd3f62..6fff3bea6 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -4296,11 +4296,15 @@ this table." (params (plist-get dest :params)) (skip (plist-get params :skip)) (skipcols (plist-get params :skipcols)) + (no-escape (plist-get params :no-escape)) beg (lines (org-table-clean-before-export (nthcdr (or skip 0) (org-split-string txt "[ \t]*\n[ \t]*")))) (i0 (if org-table-clean-did-remove-column 2 1)) + (lines (if no-escape lines + (mapcar (lambda(l) (replace-regexp-in-string + "\\([&%#_^]\\)" "\\\\\\1{}" l)) lines))) (table (mapcar (lambda (x) (if (string-match org-table-hline-regexp x)