diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2012-04-22 16:33:24 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2012-04-22 16:33:24 +0200 |
commit | 6fdfa1ede1b99012ca96fac60ddb7c9f8cde8703 (patch) | |
tree | 5d3e26b364119dd6e0ca2d6f2a0dfbdd8e119a10 | |
parent | a1fd7c46269111a4aa4a414d1ca97a236d29583b (diff) | |
download | org-mode-6fdfa1ede1b99012ca96fac60ddb7c9f8cde8703.tar.gz |
Allow beamer export to inherit some properties
* lisp/org-beamer.el (org-beamer-inherited-properties): New option.
(org-beamer-after-initial-vars): Use new option to look for inherited
properties.
-rw-r--r-- | lisp/org-beamer.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el index b24a7ad..e4776de 100644 --- a/lisp/org-beamer.el +++ b/lisp/org-beamer.el @@ -156,6 +156,12 @@ close The closing string of the environment." (string :tag "Begin") (string :tag "End")))) +(defcustom org-beamer-inherited-properties nil + "Properties that should be inherited during beamer export." + :group 'org-beamer + :type '(repeat + (string :tag "Property"))) + (defvar org-beamer-frame-level-now nil) (defvar org-beamer-header-extra nil) (defvar org-beamer-export-is-beamer-p nil) @@ -489,7 +495,13 @@ The effect is that these values will be accessible during export." (if (and (not (assoc "BEAMER_env" props)) (looking-at ".*?:B_\\(note\\(NH\\)?\\):")) (push (cons "BEAMER_env" (match-string 1)) props)) - (put-text-property (point-at-bol) (point-at-eol) 'org-props props))) + (when (org-bound-and-true-p org-beamer-inherited-properties) + (mapc (lambda (p) + (unless (assoc p props) + (let ((v (org-entry-get nil p 'inherit))) + (and v (push (cons p v) props))))) + org-beamer-inherited-properties)) + (put-text-property (point-at-bol) (point-at-eol) 'org-props props))) (setq org-export-latex-options-plist (plist-put org-export-latex-options-plist :tags nil)))))) |