From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4] Date: Mon, 20 May 2013 02:54:34 +0200 Message-ID: <87ehd2sc6t.fsf@pank.eu> References: <87wqqusder.fsf@pank.eu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeENG-0008O9-NL for emacs-orgmode@gnu.org; Sun, 19 May 2013 20:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeENF-0001AC-Jg for emacs-orgmode@gnu.org; Sun, 19 May 2013 20:54:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:48945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeENF-0001A6-CN for emacs-orgmode@gnu.org; Sun, 19 May 2013 20:54:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UeEND-0001Iy-JY for emacs-orgmode@gnu.org; Mon, 20 May 2013 02:54:47 +0200 Received: from dynamic-adsl-94-34-144-49.clienti.tiscali.it ([94.34.144.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 May 2013 02:54:47 +0200 Received: from rasmus.pank by dynamic-adsl-94-34-144-49.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 May 2013 02:54:47 +0200 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: alan.schmitt@polytechnique.org, n.goaziou@gmail.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit It seems there are some semantic bugs in ox-koma-letter.el in that new variables are introduces for SENDER (as opposed to AUTHOR) and a separate email variable as well. This seems like a semantic bug IMO. This patch fixes these issues if they in fact are issues. –Rasmus -- And let me remind you also that moderation in the pursuit of justice is no virtue --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-Changed-SENDER-to-AUTHOR-and-removed-duplicated-emai.patch >From 0cb47f73c2e3579a78c2ae7e7d9777012f142f20 Mon Sep 17 00:00:00 2001 From: "rasmus.pank" Date: Sun, 19 May 2013 22:14:54 +0200 Subject: [PATCH 4/4] Changed =#+SENDER= to =#+AUTHOR= and removed duplicated email and author variables in =ox-koma-letter.el=. * ox-koma-letter.el: changed the unorthodox =SENDER= keyword to the ordinary =AUTHOR= keyword. * ox-koma-letter.el: changed email to work as in standard latex exporter and dropped dedicated ox-koma-letter variable. --- contrib/lisp/ox-koma-letter.el | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 8ae9fc5..16bcb86 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -82,10 +82,6 @@ :group 'org-export-koma-letter :type 'string) -(defcustom org-koma-letter-sender nil - "Sender's name, as a string." - :group 'org-export-koma-letter - :type 'string) (defcustom org-koma-letter-from-address nil "Sender's address, as a string." @@ -97,10 +93,6 @@ :group 'org-export-koma-letter :type 'string) -(defcustom org-koma-letter-email nil - "Sender's email, as a string." - :group 'org-export-koma-letter - :type 'string) (defcustom org-koma-letter-place nil "Place from which the letter is sent." @@ -212,10 +204,10 @@ content temporarily.") (org-export-define-derived-backend 'koma-letter 'latex :options-alist '((:lco "LCO" nil org-koma-letter-class-option-file) - (:sender "SENDER" nil org-koma-letter-sender newline) + (:sender "AUTHOR" nil user-full-name t) (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline) (:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number) - (:email "EMAIL" nil org-koma-letter-email) + (:email "EMAIL" nil user-mail-address t) (:to-address "TO_ADDRESS" nil nil newline) (:place "PLACE" nil org-koma-letter-place) (:opening "OPENING" nil org-koma-letter-opening) @@ -361,7 +353,8 @@ holding export options." (setq lco-def (format "%s\\LoadLetterOption{%s}\n" lco-def lco-file))) lco-def)) ;; Define "From" data. - (when sender (format "\\setkomavar{fromname}{%s}\n" sender)) + (when sender (format "\\setkomavar{fromname}{%s}\n" + (org-export-data sender info))) (when from-address (format "\\setkomavar{fromaddress}{%s}\n" from-address)) (when phone-number (format "\\setkomavar{fromphone}{%s}\n" phone-number)) (when email (format "\\setkomavar{fromemail}{%s}\n" email)) -- 1.8.2.3 --=-=-=--