* org-mode table with backslash inside fails to export to DocBook
@ 2011-01-07 10:03 niels giesen
2011-01-12 18:47 ` Baoqiu Cui
0 siblings, 1 reply; 3+ messages in thread
From: niels giesen @ 2011-01-07 10:03 UTC (permalink / raw)
To: cbaoqiu; +Cc: emacs-orgmode
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1359 bytes --]
Hi Baoqiu,
A file with the following contents fails to export to Docbook:
#+begin_src org
,* Table with a backslash in it
, | \ |
#+end_src
It gives the following error
#+begin_example
"Invalid use of `\' in replacement text"
#+end_example
The following changes (replace-match literally in
`org-export-docbook-finalize-table') solves this problem for me, but I
would not know whether this would break anything else.
#+begin_src diff
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 91ebb97..ed835b0 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -1367,7 +1367,7 @@ TABLE is a string containing the HTML code generated by
(match-string 1 table)
(match-string 4 table)
"</table>")
- nil nil table)
+ nil t table)
table))
;; Change <table> into <informaltable> if caption does not exist.
(if (string-match
@@ -1377,7 +1377,7 @@ TABLE is a string containing the HTML code generated by
(match-string 1 table-with-label)
(match-string 3 table-with-label)
"</informaltable>")
- nil nil table-with-label)
+ nil t table-with-label)
table-with-label)))
;; Note: This function is very similar to
#+end_src
Regards,
Niels.
--
http://pft.github.com
[-- Attachment #1.1.1.2: Type: text/html, Size: 2316 bytes --]
[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 3+ messages in thread
* org-mode table with backslash inside fails to export to DocBook
@ 2011-01-07 17:50 niels giesen
0 siblings, 0 replies; 3+ messages in thread
From: niels giesen @ 2011-01-07 17:50 UTC (permalink / raw)
To: niels.giesen; +Cc: emacs-orgmode
Hi Baoqiu,
A file with the following contents fails to export to Docbook:
#+begin_src org
,* Table with a backslash in it
, | \ |
#+end_src
It gives the following error
#+begin_example
"Invalid use of `\' in replacement text"
#+end_example
The following changes (replace-match literally in
`org-export-docbook-finalize-table') solves this problem for me, but I
would not know whether this would break anything else.
#+begin_src diff
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 91ebb97..ed835b0 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -1367,7 +1367,7 @@ TABLE is a string containing the HTML code generated by
(match-string 1 table)
(match-string 4 table)
"</table>")
- nil nil table)
+ nil t table)
table))
;; Change <table> into <informaltable> if caption does not exist.
(if (string-match
@@ -1377,7 +1377,7 @@ TABLE is a string containing the HTML code generated by
(match-string 1 table-with-label)
(match-string 3 table-with-label)
"</informaltable>")
- nil nil table-with-label)
+ nil t table-with-label)
table-with-label)))
;; Note: This function is very similar to
#+end_src
Regards,
Niels.
--
http://pft.github.com
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: org-mode table with backslash inside fails to export to DocBook
2011-01-07 10:03 org-mode table with backslash inside fails to export to DocBook niels giesen
@ 2011-01-12 18:47 ` Baoqiu Cui
0 siblings, 0 replies; 3+ messages in thread
From: Baoqiu Cui @ 2011-01-12 18:47 UTC (permalink / raw)
To: niels giesen; +Cc: emacs-orgmode
Hi Niels,
niels giesen <niels.giesen@gmail.com> writes:
> The following changes (replace-match literally in
> `org-export-docbook-finalize-table') solves this problem for me, but I
> would not know whether this would break anything else.
>
> #+begin_src diff
> diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
> index 91ebb97..ed835b0 100644
> --- a/lisp/org-docbook.el
> +++ b/lisp/org-docbook.el
> @@ -1367,7 +1367,7 @@ TABLE is a string containing the HTML code generated by
> (match-string 1 table)
> (match-string 4 table)
> "</table>")
> - nil nil table)
> + nil t table)
> table))
> ;; Change <table> into <informaltable> if caption does not exist.
> (if (string-match
> @@ -1377,7 +1377,7 @@ TABLE is a string containing the HTML code generated by
> (match-string 1 table-with-label)
> (match-string 3 table-with-label)
> "</informaltable>")
> - nil nil table-with-label)
> + nil t table-with-label)
> table-with-label)))
>
> ;; Note: This function is very similar to
> #+end_src
This patch seems good to me. I don't think it will break anything.
Thanks,
--
Baoqiu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-12 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 10:03 org-mode table with backslash inside fails to export to DocBook niels giesen
2011-01-12 18:47 ` Baoqiu Cui
-- strict thread matches above, loose matches on Subject: below --
2011-01-07 17:50 niels giesen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.