From 7bd207790744a839cff0a80a4f477d5ecd8319e9 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 12 Dec 2009 11:11:07 +0100 Subject: [PATCH] Fix bug with option settings during beamer export --- lisp/ChangeLog | 5 +++++ lisp/org-beamer.el | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70a33e8d2..7d400cb68 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-12-12 Carsten Dominik + + * org-beamer.el (org-beamer-after-initial-vars): Do not overwrite + the options plist. + 2009-12-11 Carsten Dominik * org.el (org-startup-with-beamer-mode): New option. diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el index f900ba13f..03fb763e2 100644 --- a/lisp/org-beamer.el +++ b/lisp/org-beamer.el @@ -32,7 +32,6 @@ (defvar org-export-latex-header) (defvar org-export-latex-options-plist) (defvar org-export-opt-plist) -(defvar org-export-latex-options-plist) (defgroup org-beamer nil "Options specific for using the beamer class in LaTeX export." @@ -438,7 +437,7 @@ The effect is that these values will be accessible during export." '(put-text-property (point-at-bol) (point-at-eol) 'org-props (org-entry-properties nil 'standard))) (setq org-export-latex-options-plist - (plist-put org-export-opt-plist :tags nil)) + (plist-put org-export-latex-options-plist :tags nil)) (remove-text-properties (point-min) (point-max) '(org-props nil)) (org-map-entries '(put-text-property (point-at-bol) (point-at-eol) 'org-props @@ -469,11 +468,11 @@ This funcion will run in the final LaTeX document." (defun org-beamer-fix-toc () "Fix the table of contents by removing the vspace line." - (save-excursion - (goto-char (point-min)) - (when (re-search-forward "\\\\setcounter{tocdepth.*\n\\\\tableofcontents.*\n\\(\\\\vspace\\*.*\\)" nil t) - (delete-region (match-beginning 1) (match-end 1))))) - + (when org-beamer-export-is-beamer-p + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "\\\\setcounter{tocdepth.*\n\\\\tableofcontents.*\n\\(\\\\vspace\\*.*\\)" nil t) + (delete-region (match-beginning 1) (match-end 1)))))) (defun org-beamer-property-changed (property value) "Track the BEAMER_env property with tags." @@ -564,7 +563,6 @@ This funcion will run in the final LaTeX document." (add-hook 'org-property-allowed-value-functions 'org-beamer-allowed-property-values) - (provide 'org-beamer) ;; arch-tag: 68bac91a-a946-43a3-8173-a9269306f67c