From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives Date: Thu, 18 Jun 2015 10:47:15 +0200 Message-ID: <87lhfh8kto.fsf@gmx.us> References: <87y4jimeai.fsf@delle7240.chemeng.ucl.ac.uk> <87bngexeyv.fsf@gmx.us> <87twu66lh1.fsf@selenimh.access.network> <87616lcufl.fsf@delle7240.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5VU2-0007wi-NX for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 04:47:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5VTz-0004vR-Bu for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 04:47:38 -0400 Received: from plane.gmane.org ([80.91.229.3]:34765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5VTz-0004vL-0s for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 04:47:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z5VTs-0004EN-Jd for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 10:47:28 +0200 Received: from tsn109-201-154-189.dyn.nltelcom.net ([109.201.154.189]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jun 2015 10:47:28 +0200 Received: from rasmus by tsn109-201-154-189.dyn.nltelcom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jun 2015 10:47:28 +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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Eric S Fraga writes: > On Thursday, 18 Jun 2015 at 00:03, Nicolas Goaziou wrote: > > [...] > >> I cannot reproduce it. koma-letter back-ends explicitly allows latex >> export snippets, e.g., >> >> #+title: @@latex:\something@@ >> >> produces the expected \something. > > Ummm, I thought I was going crazy as, for once, I had tested using emacs > -Q before posting something silly to the list... > > You are correct in that it works with #+title:. It also works with > #+subject:. However, it does *not* work with #+author:. I've not tried > any of the other org setting directives. It was author I was playing > with yesterday... Right. #+author is not parsed. In the patch I enable parsing on this and others. Nicolas: are there any of the keywords in the patch that shouldn't be parsed? Also, I left out FROM_ADDRESS as I remember it interprets newlines and I don't have time ATM to properly check if this depends on the newline behavior. Rasmus -- El Rey ha muerto. ¡Larga vida al Rey! --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ox-koma-letter-Parse-more-keywords.patch >From 0dc981a8d223a0f41dc5d1f7227ae1d32e7abf2d Mon Sep 17 00:00:00 2001 From: Rasmus Date: Thu, 18 Jun 2015 10:34:17 +0200 Subject: [PATCH 1/2] ox-koma-letter: Parse more keywords * ox-koma-letter.el (koma-letter): Parse author, phone-number, opening, closing and signature. fix --- contrib/lisp/ox-koma-letter.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 119ffe9..aeb8f01 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -381,17 +381,17 @@ e.g. \"title-subject:t\"." :options-alist '((:latex-class "LATEX_CLASS" nil org-koma-letter-default-class t) (:lco "LCO" nil org-koma-letter-class-option-file) - (:author "AUTHOR" nil (org-koma-letter--get-value org-koma-letter-author) t) + (:author "AUTHOR" nil (org-koma-letter--get-value org-koma-letter-author) parse) (:author-changed-in-buffer-p "AUTHOR" nil nil t) (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline) - (:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number) + (:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number parse) (:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t) (:to-address "TO_ADDRESS" nil nil newline) - (:place "PLACE" nil org-koma-letter-place) + (:place "PLACE" nil org-koma-letter-place parse) (:subject "SUBJECT" nil nil parse) - (:opening "OPENING" nil org-koma-letter-opening) - (:closing "CLOSING" nil org-koma-letter-closing) - (:signature "SIGNATURE" nil org-koma-letter-signature newline) + (:opening "OPENING" nil org-koma-letter-opening parse) + (:closing "CLOSING" nil org-koma-letter-closing parse) + (:signature "SIGNATURE" nil org-koma-letter-signature parse) (:special-headings nil "special-headings" org-koma-letter-prefer-special-headings) (:special-tags nil nil (append -- 2.4.4 --=-=-=--