Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
d1897eed7a
|
@ -361,17 +361,17 @@ A headline is only used if #+OPENING is not set. See also
|
||||||
|
|
||||||
(org-export-define-derived-backend 'koma-letter 'latex
|
(org-export-define-derived-backend 'koma-letter 'latex
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:author "AUTHOR" nil (org-koma-letter--get-value org-koma-letter-author) t)
|
'((:latex-class "LATEX_CLASS" nil org-koma-letter-default-class t)
|
||||||
(:closing "CLOSING" nil org-koma-letter-closing)
|
|
||||||
(:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t)
|
|
||||||
(:from-address "FROM_ADDRESS" nil nil newline)
|
|
||||||
(:latex-class "LATEX_CLASS" nil org-koma-letter-default-class t)
|
|
||||||
(:lco "LCO" nil org-koma-letter-class-option-file)
|
(:lco "LCO" nil org-koma-letter-class-option-file)
|
||||||
(:opening "OPENING" nil org-koma-letter-opening)
|
(:author "AUTHOR" nil (org-koma-letter--get-value org-koma-letter-author) t)
|
||||||
|
(:from-address "FROM_ADDRESS" nil nil newline)
|
||||||
(:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number)
|
(:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number)
|
||||||
(:place "PLACE" nil org-koma-letter-place)
|
(:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t)
|
||||||
(:signature "SIGNATURE" nil org-koma-letter-signature newline)
|
|
||||||
(:to-address "TO_ADDRESS" nil nil newline)
|
(:to-address "TO_ADDRESS" nil nil newline)
|
||||||
|
(:place "PLACE" nil org-koma-letter-place)
|
||||||
|
(:opening "OPENING" nil org-koma-letter-opening)
|
||||||
|
(:closing "CLOSING" nil org-koma-letter-closing)
|
||||||
|
(:signature "SIGNATURE" nil org-koma-letter-signature newline)
|
||||||
(:special-headings nil "special-headings"
|
(:special-headings nil "special-headings"
|
||||||
org-koma-letter-prefer-special-headings)
|
org-koma-letter-prefer-special-headings)
|
||||||
(:special-tags nil nil (append
|
(:special-tags nil nil (append
|
||||||
|
|
|
@ -231,15 +231,14 @@ Return overlay specification, as a string, or nil."
|
||||||
(if a (org-beamer-export-to-pdf t s v b)
|
(if a (org-beamer-export-to-pdf t s v b)
|
||||||
(org-open-file (org-beamer-export-to-pdf nil s v b)))))))
|
(org-open-file (org-beamer-export-to-pdf nil s v b)))))))
|
||||||
:options-alist
|
: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-color-theme "BEAMER_COLOR_THEME" nil nil t)
|
||||||
(:beamer-font-theme "BEAMER_FONT_THEME" nil nil t)
|
(:beamer-font-theme "BEAMER_FONT_THEME" nil nil t)
|
||||||
(:beamer-inner-theme "BEAMER_INNER_THEME" nil nil t)
|
(:beamer-inner-theme "BEAMER_INNER_THEME" nil nil t)
|
||||||
(:beamer-outer-theme "BEAMER_OUTER_THEME" nil nil t)
|
(:beamer-outer-theme "BEAMER_OUTER_THEME" nil nil t)
|
||||||
(:beamer-header-extra "BEAMER_HEADER" nil nil newline)
|
(:beamer-header-extra "BEAMER_HEADER" nil nil newline)
|
||||||
;; Modify existing properties.
|
(:headline-levels nil "H" org-beamer-frame-level))
|
||||||
(:headline-levels nil "H" org-beamer-frame-level)
|
|
||||||
(:latex-class "LATEX_CLASS" nil "beamer" t))
|
|
||||||
:translate-alist '((bold . org-beamer-bold)
|
:translate-alist '((bold . org-beamer-bold)
|
||||||
(export-block . org-beamer-export-block)
|
(export-block . org-beamer-export-block)
|
||||||
(export-snippet . org-beamer-export-snippet)
|
(export-snippet . org-beamer-export-snippet)
|
||||||
|
|
|
@ -109,31 +109,30 @@
|
||||||
(if a (org-html-export-to-html t s v b)
|
(if a (org-html-export-to-html t s v b)
|
||||||
(org-open-file (org-html-export-to-html nil s v b)))))))
|
(org-open-file (org-html-export-to-html nil s v b)))))))
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:html-extension nil nil org-html-extension)
|
'((:creator "CREATOR" nil org-html-creator-string)
|
||||||
(:html-link-org-as-html nil nil org-html-link-org-files-as-html)
|
|
||||||
(:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
|
(: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-home "HTML_LINK_HOME" nil org-html-link-home)
|
||||||
(:html-link-up "HTML_LINK_UP" nil org-html-link-up)
|
(: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 "HTML_HEAD" nil org-html-head newline)
|
||||||
(:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra 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-default-style nil "html-style" org-html-head-include-default-style)
|
||||||
(:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts)
|
(:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts)
|
||||||
(:html-table-attributes nil nil org-html-table-default-attributes)
|
(:html-table-attributes nil nil org-html-table-default-attributes)
|
||||||
(:html-table-row-tags nil nil org-html-table-row-tags)
|
(:html-table-row-tags nil nil org-html-table-row-tags)
|
||||||
(:html-xml-declaration nil nil org-html-xml-declaration)
|
(:html-xml-declaration nil nil org-html-xml-declaration)
|
||||||
(:html-inline-images nil nil org-html-inline-images)
|
(:html-inline-images nil nil org-html-inline-images)
|
||||||
(:infojs-opt "INFOJS_OPT" nil nil)
|
(:with-latex nil "tex" org-html-with-latex)))
|
||||||
;; 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)))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Internal Variables
|
;;; Internal Variables
|
||||||
|
|
|
@ -102,13 +102,12 @@
|
||||||
(lambda (a s v b)
|
(lambda (a s v b)
|
||||||
(if a (org-latex-export-to-pdf t 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)))))))
|
(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-class-options "LATEX_CLASS_OPTIONS" nil nil t)
|
||||||
(:latex-header "LATEX_HEADER" nil nil newline)
|
(:latex-header "LATEX_HEADER" nil nil newline)
|
||||||
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
|
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
|
||||||
(:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
|
(:latex-hyperref-p nil "texht" org-latex-with-hyperref t))
|
||||||
;; Redefine regular options.
|
|
||||||
(:date "DATE" nil "\\today" t))
|
|
||||||
:filters-alist '((:filter-options . org-latex-math-block-options-filter)
|
:filters-alist '((:filter-options . org-latex-math-block-options-filter)
|
||||||
(:filter-parse-tree . org-latex-math-block-tree-filter)))
|
(:filter-parse-tree . org-latex-math-block-tree-filter)))
|
||||||
|
|
||||||
|
|
80
lisp/ox.el
80
lisp/ox.el
|
@ -106,20 +106,20 @@ BLOB is the element or object considered."
|
||||||
"Maximum nesting depth for headlines, counting from 0.")
|
"Maximum nesting depth for headlines, counting from 0.")
|
||||||
|
|
||||||
(defconst org-export-options-alist
|
(defconst org-export-options-alist
|
||||||
'((:author "AUTHOR" nil user-full-name t)
|
'((:title "TITLE" nil nil space)
|
||||||
(:creator "CREATOR" nil org-export-creator-string)
|
|
||||||
(:date "DATE" nil nil t)
|
(:date "DATE" nil nil t)
|
||||||
(:description "DESCRIPTION" nil nil newline)
|
(:author "AUTHOR" nil user-full-name t)
|
||||||
(:email "EMAIL" nil user-mail-address t)
|
(:email "EMAIL" nil user-mail-address t)
|
||||||
(:exclude-tags "EXCLUDE_TAGS" nil org-export-exclude-tags split)
|
(:description "DESCRIPTION" nil nil newline)
|
||||||
(:headline-levels nil "H" org-export-headline-levels)
|
|
||||||
(:keywords "KEYWORDS" nil nil space)
|
(:keywords "KEYWORDS" nil nil space)
|
||||||
(:language "LANGUAGE" nil org-export-default-language t)
|
(: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)
|
(:preserve-breaks nil "\\n" org-export-preserve-breaks)
|
||||||
(:section-numbers nil "num" org-export-with-section-numbers)
|
(: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)
|
(: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-archived-trees nil "arch" org-export-with-archived-trees)
|
||||||
(:with-author nil "author" org-export-with-author)
|
(:with-author nil "author" org-export-with-author)
|
||||||
(:with-clocks nil "c" org-export-with-clocks)
|
(:with-clocks nil "c" org-export-with-clocks)
|
||||||
|
@ -3209,8 +3209,8 @@ locally for the subtree through node properties."
|
||||||
(org-completing-read
|
(org-completing-read
|
||||||
"Options category: "
|
"Options category: "
|
||||||
(cons "default"
|
(cons "default"
|
||||||
(mapcar (lambda (b)
|
(mapcar #'(lambda (b)
|
||||||
(symbol-name (org-export-backend-name b)))
|
(symbol-name (org-export-backend-name b)))
|
||||||
org-export--registered-backends))))))
|
org-export--registered-backends))))))
|
||||||
options keywords)
|
options keywords)
|
||||||
;; Populate OPTIONS and KEYWORDS.
|
;; Populate OPTIONS and KEYWORDS.
|
||||||
|
@ -3225,43 +3225,14 @@ locally for the subtree through node properties."
|
||||||
(keyword (unless (assoc keyword keywords)
|
(keyword (unless (assoc keyword keywords)
|
||||||
(let ((value
|
(let ((value
|
||||||
(if (eq (nth 4 entry) 'split)
|
(if (eq (nth 4 entry) 'split)
|
||||||
(mapconcat 'identity (eval (nth 3 entry)) " ")
|
(mapconcat #'identity (eval (nth 3 entry)) " ")
|
||||||
(eval (nth 3 entry)))))
|
(eval (nth 3 entry)))))
|
||||||
(push (cons keyword value) keywords))))
|
(push (cons keyword value) keywords))))
|
||||||
(option (unless (assoc option options)
|
(option (unless (assoc option options)
|
||||||
(push (cons option (eval (nth 3 entry))) options))))))
|
(push (cons option (eval (nth 3 entry))) options))))))
|
||||||
;; Move to an appropriate location in order to insert options.
|
;; Move to an appropriate location in order to insert options.
|
||||||
(unless subtreep (beginning-of-line))
|
(unless subtreep (beginning-of-line))
|
||||||
;; First get TITLE, DATE, AUTHOR and EMAIL if they belong to the
|
;; First (multiple) OPTIONS lines. Never go past fill-column.
|
||||||
;; list of available keywords.
|
|
||||||
(when (assoc "TITLE" keywords)
|
|
||||||
(let ((title
|
|
||||||
(or (let ((visited-file (buffer-file-name (buffer-base-buffer))))
|
|
||||||
(and visited-file
|
|
||||||
(file-name-sans-extension
|
|
||||||
(file-name-nondirectory visited-file))))
|
|
||||||
(buffer-name (buffer-base-buffer)))))
|
|
||||||
(if (not subtreep) (insert (format "#+TITLE: %s\n" title))
|
|
||||||
(org-entry-put node "EXPORT_TITLE" title))))
|
|
||||||
(when (assoc "DATE" keywords)
|
|
||||||
(let ((date (with-temp-buffer (org-insert-time-stamp (current-time)))))
|
|
||||||
(if (not subtreep) (insert "#+DATE: " date "\n")
|
|
||||||
(org-entry-put node "EXPORT_DATE" date))))
|
|
||||||
(when (assoc "AUTHOR" keywords)
|
|
||||||
(let ((author (cdr (assoc "AUTHOR" keywords))))
|
|
||||||
(if subtreep (org-entry-put node "EXPORT_AUTHOR" author)
|
|
||||||
(insert
|
|
||||||
(format "#+AUTHOR:%s\n"
|
|
||||||
(if (not (org-string-nw-p author)) ""
|
|
||||||
(concat " " author)))))))
|
|
||||||
(when (assoc "EMAIL" keywords)
|
|
||||||
(let ((email (cdr (assoc "EMAIL" keywords))))
|
|
||||||
(if subtreep (org-entry-put node "EXPORT_EMAIL" email)
|
|
||||||
(insert
|
|
||||||
(format "#+EMAIL:%s\n"
|
|
||||||
(if (not (org-string-nw-p email)) ""
|
|
||||||
(concat " " email)))))))
|
|
||||||
;; Then (multiple) OPTIONS lines. Never go past fill-column.
|
|
||||||
(when options
|
(when options
|
||||||
(let ((items
|
(let ((items
|
||||||
(mapcar
|
(mapcar
|
||||||
|
@ -3279,15 +3250,26 @@ locally for the subtree through node properties."
|
||||||
(insert " " item)
|
(insert " " item)
|
||||||
(incf width (1+ (length item))))))
|
(incf width (1+ (length item))))))
|
||||||
(insert "\n")))))
|
(insert "\n")))))
|
||||||
;; And the rest of keywords.
|
;; Then the rest of keywords, in the order specified in either
|
||||||
(dolist (key (sort keywords (lambda (k1 k2) (string< (car k1) (car k2)))))
|
;; `org-export-options-alist' or respective export back-ends.
|
||||||
(unless (member (car key) '("TITLE" "DATE" "AUTHOR" "EMAIL"))
|
(dolist (key (nreverse keywords))
|
||||||
(let ((val (cdr key)))
|
(let ((val (cond ((equal (car key) "DATE")
|
||||||
(if subtreep (org-entry-put node (concat "EXPORT_" (car key)) val)
|
(or (cdr key)
|
||||||
(insert
|
(with-temp-buffer
|
||||||
(format "#+%s:%s\n"
|
(org-insert-time-stamp (current-time)))))
|
||||||
(car key)
|
((equal (car key) "TITLE")
|
||||||
(if (org-string-nw-p val) (format " %s" val) "")))))))))
|
(or (let ((visited-file
|
||||||
|
(buffer-file-name (buffer-base-buffer))))
|
||||||
|
(and visited-file
|
||||||
|
(file-name-sans-extension
|
||||||
|
(file-name-nondirectory visited-file))))
|
||||||
|
(buffer-name (buffer-base-buffer))))
|
||||||
|
(t (cdr key)))))
|
||||||
|
(if subtreep (org-entry-put node (concat "EXPORT_" (car key)) val)
|
||||||
|
(insert
|
||||||
|
(format "#+%s:%s\n"
|
||||||
|
(car key)
|
||||||
|
(if (org-string-nw-p val) (format " %s" val) ""))))))))
|
||||||
|
|
||||||
(defun org-export-expand-include-keyword (&optional included dir)
|
(defun org-export-expand-include-keyword (&optional included dir)
|
||||||
"Expand every include keyword in buffer.
|
"Expand every include keyword in buffer.
|
||||||
|
|
Loading…
Reference in New Issue