Anchor outline regexp during LaTeX tree export

* lisp/org-latex.el (org-export-latex-first-lines): Anchor outline
regexp during LaTeX tree export

Jrg Hagmann writes:

> - If you export the (new) minimal example below to latex (C-cC-e l), it works.
> - If you only export a tree (Subtree in the example; C-cC-e 1 l), the first table ends at the horizontal line and everything between it and the next node (Subsubtree) is eliminated. The second (identical) table is exported correctly.
> - If you remove the asterisk(s) in the first table, it works.
>
> This problem crept in in the last days or weeks before 7.4.
>
> It may not be a problem for most of you, but I happen to have a number of files where columns are automatically displayed as tables preceding the first subnode (#+BEGIN: columnview ...). An alternative would be to display %ITEM in column-view without the asterisks.
>
> Emacs 23.2.1 on OS X 10.6.5
> Org-mode version 7.4 (release_7.4.24.g48b11.dirty)
>
> Thanks, Jrg
>
> -------New minimal example------------
> * Subtree
>
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
>
>
> Some text
>
> ** Subsubtree
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
This commit is contained in:
Carsten Dominik 2010-12-15 12:37:45 +01:00
parent eb0d35dd18
commit 8eee473f37
1 changed files with 2 additions and 1 deletions

View File

@ -1325,7 +1325,8 @@ If END is non-nil, it is the end of the region."
(save-excursion
(goto-char (or beg (point-min)))
(let* ((pt (point))
(end (if (re-search-forward (org-get-limited-outline-regexp) end t)
(end (if (re-search-forward
(concat "^" (org-get-limited-outline-regexp)) end t)
(goto-char (match-beginning 0))
(goto-char (or end (point-max))))))
(prog1