ox-koma-letter: Fix cd7adb47d8

* contrib/lisp/ox-koma-letter.el (org-koma-letter--determine-to-and-from):
  Fix bug introduced in cd7adb47d8.
This commit is contained in:
Nicolas Goaziou 2014-01-17 22:30:25 +01:00
parent a3fab8d899
commit bec25b5397
1 changed files with 9 additions and 9 deletions

View File

@ -445,15 +445,15 @@ KEY should be `to' or `from'.
`ox-koma-letter' allows two ways to specify TO and FROM. If both `ox-koma-letter' allows two ways to specify TO and FROM. If both
are present return the preferred one as determined by are present return the preferred one as determined by
`org-koma-letter-prefer-special-headings'." `org-koma-letter-prefer-special-headings'."
(let* ((options-value (let ((option (plist-get info (if (eq key 'to) :to-address :from-address)))
(plist-get info (if (eq key 'to) :to-address :from-address))) (headline (org-koma-letter--get-tagged-contents key)))
(headline-value (org-koma-letter--get-tagged-contents key)) (replace-regexp-in-string
(value (or (if (plist-get info :special-headings) "\n" "\\\\\\\\\n"
(or headline-value option-value) (org-trim
(or option-value headline-value)) (or (if (plist-get info :special-headings) (or headline option)
;; Fallback values. (or option headline))
(if (eq key 'to) "\\mbox{}" org-koma-letter-from-address)))) ;; Fallback values.
(and value (replace-regexp-in-string "\n" "\\\\\\\\\n" (org-trim value))))) (if (eq key 'to) "\\mbox{}" org-koma-letter-from-address))))))