mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-27 07:37:25 +00:00
org-table.el: Escape some special characters when sending radio tables.
* org-table.el (orgtbl-send-table): Escape special characters. Introduce a new parameter :no-escape to prevent escaping. * org.texi (Radio tables): Document the :no-escape parameter. Thanks to Alexander Willand for raising this issue.
This commit is contained in:
parent
94bc01e77e
commit
e9dec29bb1
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user