emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* problem with ox-pandoc export
@ 2015-06-26 12:59 Alan Schmitt
  2015-06-26 15:36 ` Nicolas Goaziou
  0 siblings, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-26 12:59 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2397 bytes --]

Hello,

I’m having some issues with the ox-pandoc export and I would like to
have some help from people who understand derived backends to debug it.
Here is the github issue about it: https://github.com/kawabata/ox-pandoc/issues/3

The problem is that file metadata (author, date, title) is not present
in the export.

The main function of the exporter looks like this:

#+begin_src emacs-lisp
  (org-export-to-file 'pandoc (org-export-output-file-name
                               (concat (make-temp-name ".tmp") ".org") s)
    a s v b e (lambda (f) (org-pandoc-run-to-buffer-or-file f format s buf-or-open)))
#+end_src

If I read this correctly, it exports the org file to a temporary file
(which happens to be in org format), and then calls another function to
actually call pandoc. I think the problem is that the temporary file
created does not have the metadata in it.

For instance, this file

--8<---------------cut here---------------start------------->8---
#+title: This is a title
#+date: 1/2/3

* First section
foo

* Second section
bar
--8<---------------cut here---------------end--------------->8---

results in this temporary file

--8<---------------cut here---------------start------------->8---


* First section
foo

* Second section
bar
--8<---------------cut here---------------end--------------->8---

The derived backend is defined like this:

#+begin_src emacs-lisp
(org-export-define-derived-backend 'pandoc 'org
  :translate-alist '((template . org-pandoc-template))
  :export-block "PANDOC"
  :menu-entry
  `(?p "export via pandoc"
       ,org-pandoc-menu-entry)
  :options-alist
  '((:pandoc-options "PANDOC_OPTIONS" nil nil space)
    (:pandoc-metadata "PANDOC_METADATA" nil nil space)
    (:pandoc-variables "PANDOC_VARIABLES" nil nil space)
    (:epub-chapter-level "EPUB_CHAPTER_LEVEL" nil nil t)
    (:epub-cover-image "EPUB_COVER" nil nil t)
    (:epub-embed-font "EPUB_EMBED_FONT" nil nil newline)
    (:epub-meta "EPUB_META" nil nil newline)
    (:epub-css "EPUB_CSS" nil nil newline)
    (:epub-rights "EPUB_RIGHTS" nil nil newline)
    (:bibliography "BIBLIOGRAPHY")))
#+end_src

Is there any reason why the options would disappear during export?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

end of thread, other threads:[~2015-07-07 15:23 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26 12:59 problem with ox-pandoc export Alan Schmitt
2015-06-26 15:36 ` Nicolas Goaziou
2015-06-27 10:07   ` Alan Schmitt
2015-06-27 10:19     ` Alan Schmitt
2015-06-27 10:26       ` Nicolas Goaziou
2015-06-28 16:48         ` Alan Schmitt
2015-06-29  9:52         ` Alan Schmitt
2015-06-29 12:19           ` Nicolas Goaziou
2015-06-29 14:50             ` Alan Schmitt
2015-06-29 18:54               ` Nicolas Goaziou
2015-06-30  7:31                 ` Alan Schmitt
2015-07-01 12:57                   ` Nicolas Goaziou
2015-07-02  9:23                     ` Sebastien Vauban
2015-07-02 11:34                       ` Nicolas Goaziou
     [not found]                         ` <87ioa2n68f.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2015-07-02 11:50                           ` Sebastien Vauban
2015-07-02 12:02                         ` Rasmus
2015-07-02 14:26                           ` Fabrice Popineau
2015-07-02 14:35                             ` Rasmus
2015-07-02 14:38                               ` Fabrice Popineau
2015-07-07 15:22                                 ` Rasmus
2015-07-02 21:31                           ` Nicolas Goaziou
2015-07-02 22:31                             ` Rasmus
2015-07-03 10:23                               ` Nicolas Goaziou
2015-07-03 16:37                               ` Richard Lawrence
2015-07-03 16:42                                 ` Nicolas Goaziou
2015-07-03 16:57                                   ` Rasmus

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