From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: problem with ox-pandoc export Date: Fri, 26 Jun 2015 14:59:43 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8TEM-0002Ex-5c for emacs-orgmode@gnu.org; Fri, 26 Jun 2015 08:59:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8TEJ-0001f7-8e for emacs-orgmode@gnu.org; Fri, 26 Jun 2015 08:59:42 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:61887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8TEJ-0001e9-1Z for emacs-orgmode@gnu.org; Fri, 26 Jun 2015 08:59:39 -0400 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I=E2=80=99m 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/is= sues/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 =2D-8<---------------cut here---------------start------------->8--- #+title: This is a title #+date: 1/2/3 * First section foo * Second section bar =2D-8<---------------cut here---------------end--------------->8--- results in this temporary file =2D-8<---------------cut here---------------start------------->8--- * First section foo * Second section bar =2D-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 =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.4= 1 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJVjUy/AAoJEAQNCjtO0uXHR8AIAMTQrHR9oTkNN6DnEDGbRy/n YKuiQoGgw2UfLFnsnX7FJ21dSPwZm2g1GVnfo+2kLjnKh1WvvSVhMfAMmiFyneqL zUQXbWf3W3bsLah4qZ0RUwsBogsyvZ1lntr3UnvOjNwmQBVaAcDOx+4khgzq33oK QziDFK9fkRJzJm7E+CB1EmxNPHXv/nbdQCWjseqbV7CdV6ScIWDtb5dHpkC40Smr DwKxIK25brLwMr2bsCGR6rubO5RavWbLGMgV5ZuxugrZkM+Bt858uXPlld5jUFaa R8O3L6vYZin1pEnGOlpV52DMHVBFJaA6uVgIegLowhvOZ+K1vrEZa3zqP1vi9EY= =oANs -----END PGP SIGNATURE----- --=-=-=--