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 -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm