0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-27 09:02:52 +00:00

Fix bug with region export.

This commit is contained in:
Carsten Dominik 2008-07-23 10:40:21 -07:00
parent e67ec64a0f
commit 66a41c6298
2 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2008-07-23 Carsten Dominik <dominik@science.uva.nl>
* 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 <dominik@science.uva.nl>
* org-agenda.el (org-batch-store-agenda-views): Fix parsing bug.

View file

@ -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))