LaTeX export: Remove bug in table export.

A `save-excursion' around a call to org-table-align make point end up
*before* the table.  The reason is that a table align replaces the
entire table, including the newline before it.  When the table is
removed in order to be replaced, the marker created by
`save-excursion' slips.  `org-table-align' has it's own, built-in
`save-excursion' by remembering the line and column where the cursor
was before the align.
This commit is contained in:
Carsten Dominik 2009-08-11 07:51:12 +02:00
parent bd8e4e248a
commit 59370b6a83
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-08-11 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-tables): Remove save-excursion
around `org-table-align'.
2009-08-10 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-export-html-special-string-regexps): Definition

View File

@ -1309,8 +1309,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"Convert tables to LaTeX and INSERT it."
(goto-char (point-min))
(while (re-search-forward "^\\([ \t]*\\)|" nil t)
;; FIXME really need to save-excursion?
(save-excursion (org-table-align))
(org-table-align)
(let* ((beg (org-table-begin))
(end (org-table-end))
(raw-table (buffer-substring beg end))