diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 446ea5262..6dbfe1945 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-07-23 Carsten Dominik + + * org-exp.el (org-export-region-as-html, org-export-as-html): Make + sure that calls from `org-export-region-as-html' do not do the + special check for a subtree. + 2008-07-22 Carsten Dominik * org-agenda.el (org-batch-store-agenda-views): Fix parsing bug. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 3ca3529b6..3c18c58ed 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2610,12 +2610,13 @@ in a window. A non-interactive call will only return the buffer." (when (interactive-p) (setq buffer "*Org HTML Export*")) (let ((transient-mark-mode t) (zmacs-regions t) - rtn) + ext-plist rtn) + (setq ext-plist (plist-put ext-plist :ignore-subree-p t)) (goto-char end) (set-mark (point)) ;; to activate the region (goto-char beg) (setq rtn (org-export-as-html - nil nil nil + nil nil ext-plist buffer body-only)) (if (fboundp 'deactivate-mark) (deactivate-mark)) (if (and (interactive-p) (bufferp rtn)) @@ -2673,11 +2674,13 @@ PUB-DIR is set, use this as the publishing directory." (rbeg (and region-p (region-beginning))) (rend (and region-p (region-end))) (subtree-p - (when region-p - (save-excursion - (goto-char rbeg) - (and (org-at-heading-p) - (>= (org-end-of-subtree t t) rend))))) + (if (plist-get opt-plist :ignore-subree-p) + nil + (when region-p + (save-excursion + (goto-char rbeg) + (and (org-at-heading-p) + (>= (org-end-of-subtree t t) rend)))))) (opt-plist (if subtree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))