From 9d5e11fc79070388ea0bc9fbbfc7e60293672177 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 22 Jan 2014 15:45:23 +0100 Subject: [PATCH] export back-ends: Reorder options in templates * lisp/ox-beamer.el: Be more cautious about the order in which options are defined, at this order will be the same when creating an export template (see `org-export-insert-default-template'). * lisp/ox-html.el: Ditto. * lisp/ox-latex.el: Ditto. * lisp/ox.el: Ditto. --- lisp/ox-beamer.el | 7 +++---- lisp/ox-html.el | 27 +++++++++++++-------------- lisp/ox-latex.el | 7 +++---- lisp/ox.el | 14 +++++++------- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 485f098be..8016aa6ee 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -231,15 +231,14 @@ Return overlay specification, as a string, or nil." (if a (org-beamer-export-to-pdf t s v b) (org-open-file (org-beamer-export-to-pdf nil s v b))))))) :options-alist - '((:beamer-theme "BEAMER_THEME" nil org-beamer-theme) + '((:latex-class "LATEX_CLASS" nil "beamer" t) + (:beamer-theme "BEAMER_THEME" nil org-beamer-theme) (:beamer-color-theme "BEAMER_COLOR_THEME" nil nil t) (:beamer-font-theme "BEAMER_FONT_THEME" nil nil t) (:beamer-inner-theme "BEAMER_INNER_THEME" nil nil t) (:beamer-outer-theme "BEAMER_OUTER_THEME" nil nil t) (:beamer-header-extra "BEAMER_HEADER" nil nil newline) - ;; Modify existing properties. - (:headline-levels nil "H" org-beamer-frame-level) - (:latex-class "LATEX_CLASS" nil "beamer" t)) + (:headline-levels nil "H" org-beamer-frame-level)) :translate-alist '((bold . org-beamer-bold) (export-block . org-beamer-export-block) (export-snippet . org-beamer-export-snippet) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 8ea9e65b0..2aad8cb63 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -109,31 +109,30 @@ (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b))))))) :options-alist - '((:html-extension nil nil org-html-extension) - (:html-link-org-as-html nil nil org-html-link-org-files-as-html) + '((:creator "CREATOR" nil org-html-creator-string) (:html-doctype "HTML_DOCTYPE" nil org-html-doctype) - (:html-container "HTML_CONTAINER" nil org-html-container-element) - (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy) - (:html-link-use-abs-url nil "html-link-use-abs-url" org-html-link-use-abs-url) (:html-link-home "HTML_LINK_HOME" nil org-html-link-home) (:html-link-up "HTML_LINK_UP" nil org-html-link-up) - (:html-mathjax "HTML_MATHJAX" nil "" space) - (:html-postamble nil "html-postamble" org-html-postamble) - (:html-preamble nil "html-preamble" org-html-preamble) (:html-head "HTML_HEAD" nil org-html-head newline) (:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline) + (:html-container "HTML_CONTAINER" nil org-html-container-element) + (:html-mathjax "HTML_MATHJAX" nil "" space) + (:infojs-opt "INFOJS_OPT" nil nil) + ;; Retrieve LaTeX header for fragments. + (:latex-header "LATEX_HEADER" nil nil newline) + (:html-extension nil nil org-html-extension) + (:html-link-org-as-html nil nil org-html-link-org-files-as-html) + (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy) + (:html-link-use-abs-url nil "html-link-use-abs-url" org-html-link-use-abs-url) + (:html-postamble nil "html-postamble" org-html-postamble) + (:html-preamble nil "html-preamble" org-html-preamble) (:html-head-include-default-style nil "html-style" org-html-head-include-default-style) (:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts) (:html-table-attributes nil nil org-html-table-default-attributes) (:html-table-row-tags nil nil org-html-table-row-tags) (:html-xml-declaration nil nil org-html-xml-declaration) (:html-inline-images nil nil org-html-inline-images) - (:infojs-opt "INFOJS_OPT" nil nil) - ;; Redefine regular options. - (:creator "CREATOR" nil org-html-creator-string) - (:with-latex nil "tex" org-html-with-latex) - ;; Retrieve LaTeX header for fragments. - (:latex-header "LATEX_HEADER" nil nil newline))) + (:with-latex nil "tex" org-html-with-latex))) ;;; Internal Variables diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 0262ff9ef..4522c6b61 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -102,13 +102,12 @@ (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b) (org-open-file (org-latex-export-to-pdf nil s v b))))))) - :options-alist '((:latex-class "LATEX_CLASS" nil org-latex-default-class t) + :options-alist '((:date "DATE" nil "\\today" t) + (:latex-class "LATEX_CLASS" nil org-latex-default-class t) (:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t) (:latex-header "LATEX_HEADER" nil nil newline) (:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline) - (:latex-hyperref-p nil "texht" org-latex-with-hyperref t) - ;; Redefine regular options. - (:date "DATE" nil "\\today" t)) + (:latex-hyperref-p nil "texht" org-latex-with-hyperref t)) :filters-alist '((:filter-options . org-latex-math-block-options-filter) (:filter-parse-tree . org-latex-math-block-tree-filter))) diff --git a/lisp/ox.el b/lisp/ox.el index 73071975c..28aed704d 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -106,20 +106,20 @@ BLOB is the element or object considered." "Maximum nesting depth for headlines, counting from 0.") (defconst org-export-options-alist - '((:author "AUTHOR" nil user-full-name t) - (:creator "CREATOR" nil org-export-creator-string) + '((:title "TITLE" nil nil space) (:date "DATE" nil nil t) - (:description "DESCRIPTION" nil nil newline) + (:author "AUTHOR" nil user-full-name t) (:email "EMAIL" nil user-mail-address t) - (:exclude-tags "EXCLUDE_TAGS" nil org-export-exclude-tags split) - (:headline-levels nil "H" org-export-headline-levels) + (:description "DESCRIPTION" nil nil newline) (:keywords "KEYWORDS" nil nil space) (:language "LANGUAGE" nil org-export-default-language t) + (:select-tags "SELECT_TAGS" nil org-export-select-tags split) + (:exclude-tags "EXCLUDE_TAGS" nil org-export-exclude-tags split) + (:creator "CREATOR" nil org-export-creator-string) + (:headline-levels nil "H" org-export-headline-levels) (:preserve-breaks nil "\\n" org-export-preserve-breaks) (:section-numbers nil "num" org-export-with-section-numbers) - (:select-tags "SELECT_TAGS" nil org-export-select-tags split) (:time-stamp-file nil "timestamp" org-export-time-stamp-file) - (:title "TITLE" nil nil space) (:with-archived-trees nil "arch" org-export-with-archived-trees) (:with-author nil "author" org-export-with-author) (:with-clocks nil "c" org-export-with-clocks)