From bec25b53971b29823f823c31a7d722f1cf228b1a Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 17 Jan 2014 22:30:25 +0100 Subject: [PATCH] ox-koma-letter: Fix cd7adb47d85f6c7d2ddedd33b966d873685b55d3 * contrib/lisp/ox-koma-letter.el (org-koma-letter--determine-to-and-from): Fix bug introduced in cd7adb47d85f6c7d2ddedd33b966d873685b55d3. --- contrib/lisp/ox-koma-letter.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index eb2540146..db28af8e3 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -445,15 +445,15 @@ KEY should be `to' or `from'. `ox-koma-letter' allows two ways to specify TO and FROM. If both are present return the preferred one as determined by `org-koma-letter-prefer-special-headings'." - (let* ((options-value - (plist-get info (if (eq key 'to) :to-address :from-address))) - (headline-value (org-koma-letter--get-tagged-contents key)) - (value (or (if (plist-get info :special-headings) - (or headline-value option-value) - (or option-value headline-value)) - ;; Fallback values. - (if (eq key 'to) "\\mbox{}" org-koma-letter-from-address)))) - (and value (replace-regexp-in-string "\n" "\\\\\\\\\n" (org-trim value))))) + (let ((option (plist-get info (if (eq key 'to) :to-address :from-address))) + (headline (org-koma-letter--get-tagged-contents key))) + (replace-regexp-in-string + "\n" "\\\\\\\\\n" + (org-trim + (or (if (plist-get info :special-headings) (or headline option) + (or option headline)) + ;; Fallback values. + (if (eq key 'to) "\\mbox{}" org-koma-letter-from-address))))))