Browse Source

ox-koma-letter: Fix: Respect The "closing" Tag

* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Compare
  special-tag to string instead of symbol.  BTW indented and
  rearranged a few lines code.
Marco Wahl 1 year ago
parent
commit
76e38e8c54
1 changed files with 9 additions and 5 deletions
  1. 9 5
      contrib/lisp/ox-koma-letter.el

+ 9 - 5
contrib/lisp/ox-koma-letter.el

@@ -767,17 +767,21 @@ holding export options."
    ;; Opening.
    (format "\\opening{%s}\n\n"
            (org-koma-letter--keyword-or-headline
-            :opening (lambda (h i) (not (org-koma-letter--special-tag h i)))
+            :opening
+	    (lambda (h i)
+	      (not (org-koma-letter--special-tag h i)))
             info))
    ;; Letter body.
    contents
    ;; Closing.
    (format "\\closing{%s}\n"
-           (org-koma-letter--keyword-or-headline
-            :closing
+	   (org-koma-letter--keyword-or-headline
+	    :closing
 	    (lambda (h i)
-	      (eq (org-koma-letter--special-tag h i) 'closing))
-            info))
+	      (let ((special-tag (org-koma-letter--special-tag h i)))
+		(and special-tag
+		     (string= "closing" special-tag))))
+	    info))
    (org-koma-letter--special-contents-inline
     (plist-get info :special-tags-after-closing) info)
    ;; Letter end.