From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Rhodes Subject: [patch] Re: LATEX_CLASS_OPTIONS in SETUPFILE Date: Wed, 26 Oct 2011 16:14:28 +0100 Message-ID: <87vcrbkcob.fsf@cantab.net> References: <87fwin92z4.fsf@cantab.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ5Bv-00081D-L4 for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 11:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJ5Br-00031f-EL for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 11:14:55 -0400 Received: from lo.gmane.org ([80.91.229.12]:44921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ5Br-00031T-1f for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 11:14:51 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJ5Bo-0004TH-5C for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 17:14:48 +0200 Received: from 81.174.155.115 ([81.174.155.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Oct 2011 17:14:48 +0200 Received: from csr21 by 81.174.155.115 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Oct 2011 17:14:48 +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 --=-=-= Christophe Rhodes writes: > I believe that the > reason is that LATEX_CLASS_OPTIONS is not handled within > org-infile-export-plist in org-exp.el. Please find a patch attached addressing this issue. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-support-LATEX_CLASS_OPTIONS-in-SETUPFILE.patch >From 1f92aed1a882f93af78c57c67bd6f12401db877e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 26 Oct 2011 16:13:20 +0100 Subject: [PATCH] support LATEX_CLASS_OPTIONS in #+SETUPFILE * lisp/org-exp.el (org-infile-export-plist): handle LATEX_CLASS_OPTIONS analogolusly to LATEX_CLASS --- lisp/org-exp.el | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 2aad322..4324d38 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -737,13 +737,13 @@ modified) list.") '("TITLE" "AUTHOR" "DATE" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE" "MATHJAX" "LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE" - "LATEX_HEADER" "LATEX_CLASS" + "LATEX_HEADER" "LATEX_CLASS" "LATEX_CLASS_OPTIONS" "EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS" "KEYWORDS" "DESCRIPTION" "MACRO" "BIND" "XSLT") (mapcar 'car org-export-inbuffer-options-extra)))) (case-fold-search t) p key val text options mathjax a pr style - latex-header latex-class macros letbind + latex-header latex-class latex-class-options macros letbind ext-setup-or-nil setup-file setup-dir setup-contents (start 0)) (while (or (and ext-setup-or-nil (string-match re ext-setup-or-nil start) @@ -770,6 +770,8 @@ modified) list.") (setq latex-header (concat latex-header "\n" val))) ((string-equal key "LATEX_CLASS") (setq latex-class val)) + ((string-equal key "LATEX_CLASS_OPTIONS") + (setq latex-class-options val)) ((string-equal key "TEXT") (setq text (if text (concat text "\n" val) val))) ((string-equal key "OPTIONS") @@ -813,6 +815,8 @@ modified) list.") (setq p (plist-put p :latex-header-extra (substring latex-header 1)))) (when latex-class (setq p (plist-put p :latex-class latex-class))) + (when latex-class-options + (setq p (plist-put p :latex-class-options latex-class-options))) (when options (setq p (org-export-add-options-to-plist p options))) (when mathjax -- 1.7.5.4 --=-=-= I believe that this is a trivial change. > There may be similar keywords for LaTeX or other backends that are also > not handled which maybe should be; this one is the one I noticed because > I tried to use it. I have not spent time auditing backends for other similar keywords. Best wishes, Christophe --=-=-=--