Another fix for exporting enclosing class/title piece in buffer

* lisp/org-exp.el (org-export): Define a bound for finding enclosing
tree with class/title definition.
This commit is contained in:
Carsten Dominik 2011-04-21 18:03:05 +02:00
parent b7e3d7d90b
commit a20eebd73f
1 changed files with 3 additions and 2 deletions

View File

@ -994,11 +994,12 @@ Pressing `1' will switch between these two options."
(setq subtree-p t)
(message "Export subtree: "))))
(when (eq r1 ?\ )
(let ((case-fold-search t))
(let ((case-fold-search t)
(end (save-excursion (while (org-up-heading-safe)) (point))))
(outline-next-heading)
(if (re-search-backward
"^[ \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-"
nil t)
end t)
(progn
(org-back-to-heading t)
(setq subtree-p t)