From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Rossetti Subject: proposed patch for org-export-latex-hyperref-options-format Date: Mon, 30 Sep 2013 02:14:20 +0200 Message-ID: <84a9ivupwj.fsf@gmail.com> References: <84wqmanmcb.fsf@LAPTOP-ANDREA.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQR8A-0003tx-P5 for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 20:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQR86-0003Vv-6P for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 20:14:30 -0400 Received: from mail-ea0-x229.google.com ([2a00:1450:4013:c01::229]:56376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQR85-0003Vg-V7 for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 20:14:26 -0400 Received: by mail-ea0-f169.google.com with SMTP id k11so2318196eaj.14 for ; Sun, 29 Sep 2013 17:14:24 -0700 (PDT) In-Reply-To: <84wqmanmcb.fsf@LAPTOP-ANDREA.i-did-not-set--mail-host-address--so-tickle-me> (andrea rossetti's message of "Sat, 21 Sep 2013 18:58:12 +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 Hello everyone, may I please ask if this tiny patch looks reasonable and can be committed by the mantainers. Customizable option org-export-latex-hyperref-options-format is currently available in Org, but is ignored by the export. This patch enables use of org-export-latex-hyperref-options-format. A simple test case (to see the effect before/after patching) is reported in the "How to reproduce" section at the bottom of this mail. Kindest regards, Andrea https://github.com/thesoftwarebin -----------8<--patch file start------>8-------------------- diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 196e50f..91dbeff 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1120,7 +1120,7 @@ holding export options." (format "\\title{%s}\n" title) ;; Hyperref options. (when (plist-get info :latex-hyperref-p) - (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" + (format org-export-latex-hyperref-options-format (or (plist-get info :keywords) "") (or (plist-get info :description) "") (if (not (plist-get info :with-creator)) "" -----------8<--patch file end-------->8-------------------- > From: andrea.rossetti@gmail.com > Subject: Bug: Customization of "Org Export Latex Hyperref Options Format" ignored > To: emacs-orgmode@gnu.org > Date: Sat, 21 Sep 2013 18:58:12 +0200 (1 week, 1 day, 6 hours ago) > > Hello everyone, > > option "Org Export Latex Hyperref Options Format" > (aka org-export-latex-hyperref-options-format) > seems to have no effect on my latex exports, i.e. > the latex pramble always contains this same text: > > =========================================== > \hypersetup{ > pdfkeywords={}, > pdfsubject={}, > pdfcreator={Emacs 24.3.1 (Org mode 8.2)}} > =========================================== > > May I please ask if this is reproducible on > your installation as well, or if it's just me. > > Thanks in advance, kindest regards. > > Andrea > https://github.com/thesoftwarebin > > ============================================= > How to reproduce: > > 1) check that option "Org Latex With Hyperref" > is enabled > > 2) create a simple example.org file: > * hello > ** blah > ** bleah > * end > > 3) export to latex buffer (C-c C-e l L), > look at the \hypersetup{...} lines > > 4) close the *Org LATEX Export* buffer > with C-x k > > 5) add text "blah" somewhere in the value of > option "Org Export Latex Hyperref Options Format" > > 6) export again to latex buffer (C-c C-e l L) > > 7) \hypersetup{...} lines should have changed > accordingly to changes made in step 3), but > they don't change for me > =============================================