From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: problem with ox-pandoc export Date: Tue, 30 Jun 2015 09:31:35 +0200 Message-ID: References: <87a8vmv5vq.fsf@nicolasgoaziou.fr> <87pp4htpk1.fsf@nicolasgoaziou.fr> <878ub2k8pq.fsf@nicolasgoaziou.fr> <874mlqjqfk.fsf@nicolasgoaziou.fr> 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]:41776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9q12-00063G-Dn for emacs-orgmode@gnu.org; Tue, 30 Jun 2015 03:31:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9q0z-0002Uh-40 for emacs-orgmode@gnu.org; Tue, 30 Jun 2015 03:31:36 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9q0y-0002UB-VP for emacs-orgmode@gnu.org; Tue, 30 Jun 2015 03:31:33 -0400 In-Reply-To: <874mlqjqfk.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 29 Jun 2015 20:54:39 +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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-06-29 20:54, Nicolas Goaziou writes: > Alan Schmitt writes: > >> There is an `org-pandoc-template' already, it just does not deal with >> the metadata used in `org-org-template'. I was thinking of reusing >> `org-org-template' directly, but if I understand your suggestion, we >> should just copy that code in `org-pandoc-template'. Is this correct? > > Correct. > > Also, I don't think you need /exactly/ `org-org-template', since pandoc > probably uses another syntax for meta-data, doesn't it? I don't think so. This is the way ox-pandoc works (format is the target format): #+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 In short, it exports the org file to another temporary org file (using the pandoc exporter that inherits from the org exporter), then it calls the pandoc binary to convert from org to the target format. The first step (org to temporary org) is used to extract some information from the org file that is used in further steps (like creating a custom CSS or adding arguments to the call to the pandoc binary). The problem seems to be that the org to org export part is not the identity. Calling `org-org-template' in `org-pandoc-template' solves the issue. 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 iQEcBAEBCgAGBQJVkkXXAAoJEAQNCjtO0uXHTkUIAMPiHwPncqXECAqWBLKA1ZUL Bd/GguvRn9wbB4gBFJBw1Khkd5AyRxDbygXsfLj42/XGSZNFdt5yRBqgh4b56jOq LD7ZWA/lp6U9XmQFbYsoaZGpBN6f0/Y8Htrjvq5flmZUelF1NTMT6t1sqGPjf8cG /risJRx94vspAcZL1jeCtEGlm+Z0Yqd4JLBL3WFNSfB85BHbUI5O+34iSUfzEzjs l80XNqip/VAf0fCLS74MjFlDZO1CtlXrHlOKfKWihtsJwFzIGxkX9WN6gSu4HikF 2xMQj919mzeV78lrU4JZggoUnlJABnbLzWG0QNH8zTTxvUzQS3l6h2KC6O+m7pw= =eeHf -----END PGP SIGNATURE----- --=-=-=--