emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2013-09-21 16:58 andrea.rossetti
  2013-09-30  0:14 ` proposed patch for org-export-latex-hyperref-options-format Andrea Rossetti
  0 siblings, 1 reply; 6+ messages in thread
From: andrea.rossetti @ 2013-09-21 16:58 UTC (permalink / raw)
  To: emacs-orgmode


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





Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt6.1.7600)
 of 2013-03-17 on MARVIN
Package: Org-mode version 8.2 (8.2-elpa @ c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20130919/)

current state:
==============
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
                          org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-drill-optimal-factor-matrix '((2 (2.2199999999999998 . 2.277)
                                    (1.9000000000000001 . 2.065)
                                    (2.04 . 2.195))
                                   (1 (1.96 . 3.58) (2.08 . 3.86)
                                    (2.2199999999999998 . 3.725) (2.04 . 3.59)
                                    (2.36 . 3.86) (2.1799999999999997 . 3.72)
                                    (1.7000000000000002 . 3.44))
                                   )
 org-export-with-drawers nil
 org-export-copy-to-kill-ring t
 org-export-date-timestamp-format "%Y-%m-%d"
 org-beamer-column-view-format "%45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt)"
 org-export-with-tags 'not-in-toc
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
                      org-src-native-tab-command-maybe
                      org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-export-latex-hyperref-options-format "\\hypersetup{\n  pdfkeywords={%s},\n  pdfsubject={%s},\n  pdfcreator={blah: %s}}\n"
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo
               org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m
               org-drill)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
                          org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-with-sub-superscripts '{}
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-default-notes-file "~/.emacs.d/org/notes.org"
 org-latex-classes '(("beamer"
                      "\\documentclass[presentation]{beamer}\n[DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]"
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("article" "\\documentclass[11pt]{article}"
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                      ("\\paragraph{%s}" . "\\paragraph*{%s}")
                      ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                     ("report" "\\documentclass[11pt]{report}"
                      ("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}")
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("book" "\\documentclass[11pt]{book}"
                      ("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}")
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     )
 org-export-backends '(beamer html icalendar latex md rss)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-enforce-todo-dependencies t
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-mode-hook '(org-drill-add-cloze-fontification
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all
                    append local]
                   5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
                    org-babel-show-result-all append local]
                   5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-directory "~/.emacs.d/org"
 org-beamer-outline-frame-options ""
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                               org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )

^ permalink raw reply	[flat|nested] 6+ messages in thread

* proposed patch for org-export-latex-hyperref-options-format
  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
  2013-09-30 10:13   ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Rossetti @ 2013-09-30  0:14 UTC (permalink / raw)
  To: emacs-orgmode


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: proposed patch for org-export-latex-hyperref-options-format
  2013-09-30  0:14 ` proposed patch for org-export-latex-hyperref-options-format Andrea Rossetti
@ 2013-09-30 10:13   ` Nicolas Goaziou
  2013-09-30 18:16     ` Andrea Rossetti
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-09-30 10:13 UTC (permalink / raw)
  To: Andrea Rossetti; +Cc: emacs-orgmode

Hello,


Andrea Rossetti <andrea.rossetti@gmail.com> writes:

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

There is no such variable in Org. It probably comes from the old export
engine.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposed patch for org-export-latex-hyperref-options-format
  2013-09-30 10:13   ` Nicolas Goaziou
@ 2013-09-30 18:16     ` Andrea Rossetti
  2013-10-01 15:42       ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Rossetti @ 2013-09-30 18:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


Hello,

  apologies for my mistake. Nicolas you were right,
org-export-latex-hyperref-options-format was present
only in the old exporter, in a file named "org-latex.el".

  I'd like to suggest a customizable hypersetup string
as a future, non-urgent enhancement of ox-latex.el; the
defcustom at line 324 of this old file:

http://repo.or.cz/w/emacs.git/blob/HEAD:/lisp/org/org-latex.el

could fit reasonably well for variable name, default value,
type and docstring. 

  Thanks for your attention, kindest regards.

Andrea
http://github.com/thesoftwarebin



Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
>
> Andrea Rossetti <andrea.rossetti@gmail.com> writes:
>
>>   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.
>
> There is no such variable in Org. It probably comes from the old export
> engine.
>
>
> Regards,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposed patch for org-export-latex-hyperref-options-format
  2013-09-30 18:16     ` Andrea Rossetti
@ 2013-10-01 15:42       ` Nicolas Goaziou
  2013-10-01 19:51         ` Andrea Rossetti
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-10-01 15:42 UTC (permalink / raw)
  To: Andrea Rossetti; +Cc: emacs-orgmode

Hello,

Andrea Rossetti <andrea.rossetti@gmail.com> writes:

>   I'd like to suggest a customizable hypersetup string
> as a future, non-urgent enhancement of ox-latex.el; the
> defcustom at line 324 of this old file:
>
> http://repo.or.cz/w/emacs.git/blob/HEAD:/lisp/org/org-latex.el
>
> could fit reasonably well for variable name, default value,
> type and docstring.

You can disable the hypersetup with `org-latex-with-hyperref' (or
locally with #+options: texht:nil) and install you own
with #+latex_header, or in your class.

I don't think we need yet another way to provide a customized hypersetup
string. Do we?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposed patch for org-export-latex-hyperref-options-format
  2013-10-01 15:42       ` Nicolas Goaziou
@ 2013-10-01 19:51         ` Andrea Rossetti
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea Rossetti @ 2013-10-01 19:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Andrea Rossetti, emacs-orgmode


  Thanks Nicolas for your last directions,
I will apply them.

  The accidental coexistence of two Org versions
on my Emacs installation (built-in versus ELPA)
confused me a bit, apologies for the noise.

  Kindest regards,

  Andrea

Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
> You can disable the hypersetup with `org-latex-with-hyperref' (or
> locally with #+options: texht:nil) and install you own
> with #+latex_header, or in your class.
>
> I don't think we need yet another way to provide a customized hypersetup
> string. Do we?
>
>
> Regards,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-01 19:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` proposed patch for org-export-latex-hyperref-options-format Andrea Rossetti
2013-09-30 10:13   ` Nicolas Goaziou
2013-09-30 18:16     ` Andrea Rossetti
2013-10-01 15:42       ` Nicolas Goaziou
2013-10-01 19:51         ` Andrea Rossetti

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).