emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andrea Rossetti <andrea.rossetti@gmail.com>
To: emacs-orgmode@gnu.org
Subject: proposed patch for org-export-latex-hyperref-options-format
Date: Mon, 30 Sep 2013 02:14:20 +0200	[thread overview]
Message-ID: <84a9ivupwj.fsf@gmail.com> (raw)
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")


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
> =============================================

  reply	other threads:[~2013-09-30  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 16:58 Bug: Customization of "Org Export Latex Hyperref Options Format" ignored [8.2 (8.2-elpa @ c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20130919/)] andrea.rossetti
2013-09-30  0:14 ` Andrea Rossetti [this message]
2013-09-30 10:13   ` proposed patch for org-export-latex-hyperref-options-format Nicolas Goaziou
2013-09-30 18:16     ` Andrea Rossetti
2013-10-01 15:42       ` Nicolas Goaziou
2013-10-01 19:51         ` Andrea Rossetti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84a9ivupwj.fsf@gmail.com \
    --to=andrea.rossetti@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).