ox-koma-letter.el: Set LCO option before other KOMA variables
commitcab6718d4b41f1fb9127384ddeac33f3afbec338
authorViktor Rosenfeld <hesk@cartman>
Sun, 21 Apr 2013 11:41:22 +0000 (21 13:41 +0200)
committerAlan Schmitt <alan.schmitt@polytechnique.org>
Tue, 23 Apr 2013 07:16:53 +0000 (23 09:16 +0200)
tree07a8b033aa733b1a6ddbd07c54670961408c0875
parent155deedb4d05042fa350193d3b2d989cadae2ee0
ox-koma-letter.el: Set LCO option before other KOMA variables

  * ox-koma-letter.el (org-koma-letter-closing): More
  business-like closing.
  (org-koma-letter-from-address): Do not set default personal
  information.
  (org-koma-letter-opening): Gendered opening.
  (org-koma-letter-phone-number): Do not set default personal
  information.
  (org-koma-letter-sender): Use `#+SENDER:' instead of
  `#+AUTHOR:' because the latter is always set by the LaTeX
  exporter.
  (org-koma-letter-email): Duplicte `#+EMAIL:' in this exporter
  because it is always set by the LaTeX exporter.
  (koma-letter): Add additional `#+SENDER:' and `#+EMAIL:' to
  exporter (see above).
  (org-koma-letter-template): Set LCO before evaluating other
  KOMA variables if they are set; add `#+SENDER:' and `#+EMAIL:'
  to template (see above).

The LCO file is set loaded first and KOMA variables are only set if
their value is not `nil'.

Example:

  #+LCO: Default
  #+SIGNATURE: A friend

will result in the following LaTeX code:

  #+BEGIN_SRC latex
  \LoadLetterOption{Default}        % LCO file, with default signature
  \setkomavar{signature}{A friend}  % Overwrite signature
  #+END_SRC

Other KOMA variables defined in the LCO file, e.g., `fromaddress', will
not be overwritten.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
contrib/lisp/ox-koma-letter.el