summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-04-21 18:03:05 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2011-04-21 18:03:05 +0200
commita20eebd73f0c44dfa133ff66de1b2507e9bb0bd9 (patch)
tree6f65a173c2ff978c6a32fd1532fcb6020549c06b
parentb7e3d7d90b655153d2a51cab584a5561c18262ec (diff)
downloadorg-mode-a20eebd73f0c44dfa133ff66de1b2507e9bb0bd9.tar.gz
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.
-rw-r--r--lisp/org-exp.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 75051e5..606cbb0 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -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)