From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Inhibit default EMAIL in derived exporter Date: Mon, 13 May 2013 20:35:20 +0200 Message-ID: <20130513183520.GA9028@client204-235.wlan.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubxap-0006x6-Ov for emacs-orgmode@gnu.org; Mon, 13 May 2013 14:35:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubxao-0003Bq-2D for emacs-orgmode@gnu.org; Mon, 13 May 2013 14:35:27 -0400 Received: from mail-bk0-x232.google.com ([2a00:1450:4008:c01::232]:44077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubxan-0003Bf-Rl for emacs-orgmode@gnu.org; Mon, 13 May 2013 14:35:25 -0400 Received: by mail-bk0-f50.google.com with SMTP id ik5so2695438bkc.37 for ; Mon, 13 May 2013 11:35:24 -0700 (PDT) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Nicolas Goaziou Hi, commit 16f12e0 changed how the EMAIL option is configured in a derived exporter that also uses this keyword. In `contrib/ox-koma-letter.el', the koma-letter exporter configures the default of the EMAIL option to the variable `org-koma-letter-email'. However, since commit 16f12e0, if the option is missing, the default is set to `user-mail-address' which is the default for the standard LaTeX exporter. The current code causes the following bug in koma-letter exporter: If EMAIL is missing, and `org-koma-letter-email' is `nil', then the exporter should not set a email address in the exported LaTeX file. The rationale is that the email address is configured in an external LCO file (and can be overwritten for an individual letter, if desired). However, the new behavior causes the email to be set explicitly, overwriting the value from the LCO file. Consider the following example: #+BEGIN_SRC org #+LATEX_CLASS: my-letter #+LCO: DefaultAddress #+END_SRC The expected LaTeX-code is: #+BEGIN_SRC latex \documentclass{scrlttr2} \LoadLetterOption{DefaultAddress} % <--- email is set here % ... \begin{document} % ... \end{document} #+END_SRC However, since commit 16f12e0, the generated code is: #+BEGIN_SRC latex \documentclass{scrlttr2} \LoadLetterOption{DefaultAddress} % <--- email is set here \setkomavar{fromemail}{he-sk@client204-235.wlan.hu-berlin.de} % <--- email is overwritten here % ... \begin{document} % ... \end{document} #+END_SRC Is this a bug in the LaTeX exporter or is this the intended behavior? Should I maybe use another keyword instead of EMAIL? I think I used SENDER instead of AUTHOR because of a similar conflict. Cheers, Viktor