emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: problem with ox-pandoc export
Date: Tue, 30 Jun 2015 09:31:35 +0200	[thread overview]
Message-ID: <m2zj3hk5yg.fsf@charm-ecran.irisa.fr> (raw)
In-Reply-To: <874mlqjqfk.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 29 Jun 2015 20:54:39 +0200")

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

On 2015-06-29 20:54, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> 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

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

  reply	other threads:[~2015-06-30  7:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zj3hk5yg.fsf@charm-ecran.irisa.fr \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).