Merge branch 'maint'

Conflicts:
	contrib/lisp/ox-koma-letter.el
This commit is contained in:
Nicolas Goaziou 2013-07-12 09:10:26 +02:00
commit 0cdf2eb7ce
3 changed files with 69 additions and 66 deletions

View File

@ -499,27 +499,27 @@ holding export options."
(and (plist-get info :time-stamp-file) (and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; Document class and packages. ;; Document class and packages.
(let ((class (plist-get info :latex-class)) (let* ((class (plist-get info :latex-class))
(class-options (plist-get info :latex-class-options))) (class-options (plist-get info :latex-class-options))
(org-element-normalize-string (header (nth 1 (assoc class org-latex-classes)))
(let* ((header (nth 1 (assoc class org-latex-classes))) (document-class-string
(document-class-string (and (stringp header)
(and (stringp header) (if (not class-options) header
(if (not class-options) header (replace-regexp-in-string
(replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)" class-options header t nil 1)))))
class-options header t nil 1))))) (if (not document-class-string)
(if (not document-class-string) (user-error "Unknown LaTeX class `%s'" class)
(user-error "Unknown LaTeX class `%s'" class) (org-latex-guess-babel-language
(org-latex-guess-babel-language (org-latex-guess-inputenc
(org-latex-guess-inputenc (org-element-normalize-string
(org-splice-latex-header (org-splice-latex-header
document-class-string document-class-string
org-latex-default-packages-alist ; defined in org.el org-latex-default-packages-alist ; Defined in org.el.
org-latex-packages-alist nil ; defined in org.el org-latex-packages-alist nil ; Defined in org.el.
(concat (plist-get info :latex-header) (concat (org-element-normalize-string (plist-get info :latex-header))
(plist-get info :latex-header-extra)))) (plist-get info :latex-header-extra)))))
info))))) info)))
(let ((lco (plist-get info :lco)) (let ((lco (plist-get info :lco))
(author (plist-get info :author)) (author (plist-get info :author))
(from-address (org-koma-letter--determine-special-value info 'from)) (from-address (org-koma-letter--determine-special-value info 'from))
@ -578,8 +578,8 @@ holding export options."
(dotimes (x l y) (dotimes (x l y)
(setq y (concat (if (> x 0) "%s," "%s") y))) (setq y (concat (if (> x 0) "%s," "%s") y)))
subject-format) "}\n")) subject-format) "}\n"))
(when (and subject with-subject) (when (and subject with-subject)
(format "\\setkomavar{subject}{%s}\n\n" subject)))) (format "\\setkomavar{subject}{%s}\n\n" subject))))
;; Letter start ;; Letter start
(format "\\begin{letter}{%%\n%s}\n\n" (format "\\begin{letter}{%%\n%s}\n\n"
(org-koma-letter--determine-special-value info 'to)) (org-koma-letter--determine-special-value info 'to))

View File

@ -861,28 +861,30 @@ holding export options."
(and (plist-get info :time-stamp-file) (and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; 2. Document class and packages. ;; 2. Document class and packages.
(let ((class (plist-get info :latex-class)) (let* ((class (plist-get info :latex-class))
(class-options (plist-get info :latex-class-options))) (class-options (plist-get info :latex-class-options))
(org-element-normalize-string (header (nth 1 (assoc class org-latex-classes)))
(let* ((header (nth 1 (assoc class org-latex-classes))) (document-class-string
(document-class-string (and (stringp header)
(and (stringp header) (if (not class-options) header
(if (not class-options) header (replace-regexp-in-string
(replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)" class-options header t nil 1)))))
class-options header t nil 1))))) (if (not document-class-string)
(if (not document-class-string) (user-error "Unknown LaTeX class `%s'" class)
(user-error "Unknown LaTeX class `%s'" class) (org-latex-guess-babel-language
(org-latex-guess-babel-language (org-latex-guess-inputenc
(org-latex-guess-inputenc (org-element-normalize-string
(org-splice-latex-header (org-splice-latex-header
document-class-string document-class-string
org-latex-default-packages-alist org-latex-default-packages-alist
org-latex-packages-alist nil org-latex-packages-alist nil
(concat (plist-get info :latex-header) (concat (org-element-normalize-string
(plist-get info :latex-header-extra) (plist-get info :latex-header))
(plist-get info :beamer-header-extra)))) (org-element-normalize-string
info))))) (plist-get info :latex-header-extra))
(plist-get info :beamer-header-extra)))))
info)))
;; 3. Insert themes. ;; 3. Insert themes.
(let ((format-theme (let ((format-theme
(function (function

View File

@ -1077,27 +1077,28 @@ holding export options."
(and (plist-get info :time-stamp-file) (and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; Document class and packages. ;; Document class and packages.
(let ((class (plist-get info :latex-class)) (let* ((class (plist-get info :latex-class))
(class-options (plist-get info :latex-class-options))) (class-options (plist-get info :latex-class-options))
(org-element-normalize-string (header (nth 1 (assoc class org-latex-classes)))
(let* ((header (nth 1 (assoc class org-latex-classes))) (document-class-string
(document-class-string (and (stringp header)
(and (stringp header) (if (not class-options) header
(if (not class-options) header (replace-regexp-in-string
(replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)" class-options header t nil 1)))))
class-options header t nil 1))))) (if (not document-class-string)
(if (not document-class-string) (user-error "Unknown LaTeX class `%s'" class)
(user-error "Unknown LaTeX class `%s'" class) (org-latex-guess-babel-language
(org-latex-guess-babel-language (org-latex-guess-inputenc
(org-latex-guess-inputenc (org-element-normalize-string
(org-splice-latex-header (org-splice-latex-header
document-class-string document-class-string
org-latex-default-packages-alist org-latex-default-packages-alist
org-latex-packages-alist nil org-latex-packages-alist nil
(concat (plist-get info :latex-header) (concat (org-element-normalize-string
(plist-get info :latex-header-extra)))) (plist-get info :latex-header))
info))))) (plist-get info :latex-header-extra)))))
info)))
;; Possibly limit depth for headline numbering. ;; Possibly limit depth for headline numbering.
(let ((sec-num (plist-get info :section-numbers))) (let ((sec-num (plist-get info :section-numbers)))
(when (integerp sec-num) (when (integerp sec-num)