* 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
* Re: problem with ox-pandoc export
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
0 siblings, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-06-26 15:36 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
Hello,
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> Is there any reason why the options would disappear during export?
Maybe "ox-pandoc" doesn't handle this meta-data. Perhaps you're doing
a "body-only" export. Or you have `org-export-with-title' and al. set to
nil...
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-06-26 15:36 ` Nicolas Goaziou
@ 2015-06-27 10:07 ` Alan Schmitt
2015-06-27 10:19 ` Alan Schmitt
0 siblings, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-27 10:07 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
On 2015-06-26 17:36, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> Is there any reason why the options would disappear during export?
>
> Maybe "ox-pandoc" doesn't handle this meta-data.
ox-pandoc does not do anything with that meta-data when generating the
temporary org file. Shouldn't it inherited from the org exporter?
> Perhaps you're doing a "body-only" export.
No, I just checked.
> Or you have `org-export-with-title' and al. set to nil...
No, and I can reproduce this with an empty configuration. So I guess
there is something fishy going on in the generation of the temporary org
file.
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
* Re: problem with ox-pandoc export
2015-06-27 10:07 ` Alan Schmitt
@ 2015-06-27 10:19 ` Alan Schmitt
2015-06-27 10:26 ` Nicolas Goaziou
0 siblings, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-27 10:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
On 2015-06-27 12:07, Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> No, and I can reproduce this with an empty configuration. So I guess
> there is something fishy going on in the generation of the temporary org
> file.
Here is an ECM to show the issue. Evaluate this code:
#+begin_src emacs-lisp
(org-export-define-derived-backend 'mytest 'org
:translate-alist '((template . org-pandoc-template))
:export-block "MYTEST"
:menu-entry '(?t "test" as/org-export-test))
(defun as/org-export-test (&optional a s v b e)
(org-export-to-file 'mytest
(org-export-output-file-name
(concat (make-temp-name ".tmp") ".org") s)))
#+end_src
Then try it with 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---
The resulting exported file is missing the title and date.
Best,
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
* Re: problem with ox-pandoc export
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
0 siblings, 2 replies; 26+ messages in thread
From: Nicolas Goaziou @ 2015-06-27 10:26 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2015-06-27 12:07, Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> No, and I can reproduce this with an empty configuration. So I guess
>> there is something fishy going on in the generation of the temporary org
>> file.
>
> Here is an ECM to show the issue. Evaluate this code:
>
> #+begin_src emacs-lisp
> (org-export-define-derived-backend 'mytest 'org
> :translate-alist '((template . org-pandoc-template))
> :export-block "MYTEST"
> :menu-entry '(?t "test" as/org-export-test))
>
> (defun as/org-export-test (&optional a s v b e)
> (org-export-to-file 'mytest
> (org-export-output-file-name
> (concat (make-temp-name ".tmp") ".org") s)))
> #+end_src
"ox-org" inserts meta-data in its template function (org-org-template).
Since you're overriding it in the `mytest' back-end, you need to take
care of that.
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-06-27 10:26 ` Nicolas Goaziou
@ 2015-06-28 16:48 ` Alan Schmitt
2015-06-29 9:52 ` Alan Schmitt
1 sibling, 0 replies; 26+ messages in thread
From: Alan Schmitt @ 2015-06-28 16:48 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
On 2015-06-27 12:26, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> "ox-org" inserts meta-data in its template function (org-org-template).
> Since you're overriding it in the `mytest' back-end, you need to take
> care of that.
Ah, I was not aware of this. 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
* Re: problem with ox-pandoc export
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
1 sibling, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-29 9:52 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
Hello Nicolas,
On 2015-06-27 12:26, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> "ox-org" inserts meta-data in its template function (org-org-template).
> Since you're overriding it in the `mytest' back-end, you need to take
> care of that.
It seems that (org-org-template) is not available in the currently
released version (I looked into the maint branch and could not see it).
Is there a way to support both the master and the maint branch for
ox-pandoc?
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
* Re: problem with ox-pandoc export
2015-06-29 9:52 ` Alan Schmitt
@ 2015-06-29 12:19 ` Nicolas Goaziou
2015-06-29 14:50 ` Alan Schmitt
0 siblings, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-06-29 12:19 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> It seems that (org-org-template) is not available in the currently
> released version (I looked into the maint branch and could not see
> it).
Correct.
> Is there a way to support both the master and the maint branch for
> ox-pandoc?
Since you are going to override it anyway, how does it matter? Just
define `org-pandoc-template' and associate it to `template' context in
"ox-pandoc.el". Am I mistaken?
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-06-29 12:19 ` Nicolas Goaziou
@ 2015-06-29 14:50 ` Alan Schmitt
2015-06-29 18:54 ` Nicolas Goaziou
0 siblings, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-29 14:50 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On 2015-06-29 14:19, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> Is there a way to support both the master and the maint branch for
>> ox-pandoc?
>
> Since you are going to override it anyway, how does it matter? Just
> define `org-pandoc-template' and associate it to `template' context in
> "ox-pandoc.el". Am I mistaken?
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?
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
* Re: problem with ox-pandoc export
2015-06-29 14:50 ` Alan Schmitt
@ 2015-06-29 18:54 ` Nicolas Goaziou
2015-06-30 7:31 ` Alan Schmitt
0 siblings, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-06-29 18:54 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
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?
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-06-29 18:54 ` Nicolas Goaziou
@ 2015-06-30 7:31 ` Alan Schmitt
2015-07-01 12:57 ` Nicolas Goaziou
0 siblings, 1 reply; 26+ messages in thread
From: Alan Schmitt @ 2015-06-30 7:31 UTC (permalink / raw)
To: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-06-30 7:31 ` Alan Schmitt
@ 2015-07-01 12:57 ` Nicolas Goaziou
2015-07-02 9:23 ` Sebastien Vauban
0 siblings, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-07-01 12:57 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> 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).
So this is not a Pandoc export back-end (i.e. a back-end that translates
Org syntax into Pandoc's extended Markdown syntax).
I think it would be nice to have the latter in core, even more so when
we finally introduce citation syntax in Org.
> 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.
Then mimic `org-org-template' in `org-pandoc-template', as it is really
basic.
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-01 12:57 ` Nicolas Goaziou
@ 2015-07-02 9:23 ` Sebastien Vauban
2015-07-02 11:34 ` Nicolas Goaziou
0 siblings, 1 reply; 26+ messages in thread
From: Sebastien Vauban @ 2015-07-02 9:23 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Nicolas Goaziou <mail-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org> writes:
> Alan Schmitt <alan.schmitt-o/5/jSaJEHk+NdeTPqioyti2O/JbrIOy@public.gmane.org> writes:
>
>> 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).
>
> So this is not a Pandoc export back-end (i.e. a back-end that translates
> Org syntax into Pandoc's extended Markdown syntax).
If the pandoc back-end is some flavor of Markdown, shouldn't it be
better named `ox-md-pandoc'?
BTW, when looking at Markdown formats known by Pandoc, there are:
- Pandoc markdown
- Pandoc markdown_github
- Pandoc markdown_mmd
- Pandoc markdown_phpextra
- Pandoc markdown_strict
Is the Pandoc back-end exporting the flavor known as "Pandoc markdown"?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
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 12:02 ` Rasmus
0 siblings, 2 replies; 26+ messages in thread
From: Nicolas Goaziou @ 2015-07-02 11:34 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hello,
Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> Nicolas Goaziou <mail-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org> writes:
>> So this is not a Pandoc export back-end (i.e. a back-end that translates
>> Org syntax into Pandoc's extended Markdown syntax).
> If the pandoc back-end is some flavor of Markdown, shouldn't it be
> better named `ox-md-pandoc'?
Which one are you talking about, the one from ELPA or the one I suggest
adding to core?
The former doesn't translate to Markdown at all. It simply calls pandoc
on an Org document to produce something else. It depends on how well
pandoc's Org importer behaves, i.e, how much Org syntax it does support.
Therefore, I suggest to write an Org to native pandoc's syntax. It would
be derived from "ox-md" but that doesn't mean its name must be prefixed
with "ox-md", consider, for example "ox-beamer" and "ox-latex".
> BTW, when looking at Markdown formats known by Pandoc, there are:
>
> - Pandoc markdown
> - Pandoc markdown_github
> - Pandoc markdown_mmd
> - Pandoc markdown_phpextra
> - Pandoc markdown_strict
>
> Is the Pandoc back-end exporting the flavor known as "Pandoc
> markdown"?
See above.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 26+ messages in thread
[parent not found: <87ioa2n68f.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>]
* Re: problem with ox-pandoc export
[not found] ` <87ioa2n68f.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
@ 2015-07-02 11:50 ` Sebastien Vauban
0 siblings, 0 replies; 26+ messages in thread
From: Sebastien Vauban @ 2015-07-02 11:50 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: public-emacs-orgmode-mXXj517/zsQ-wOFGN7rlS/M9smdsby/KFg
Hello,
Nicolas Goaziou writes:
> Sebastien Vauban writes:
>> Nicolas Goaziou writes:
>
>>> So this is not a Pandoc export back-end (i.e. a back-end that
>>> translates Org syntax into Pandoc's extended Markdown syntax).
>
>> If the pandoc back-end is some flavor of Markdown, shouldn't it be
>> better named `ox-md-pandoc'?
>
> Which one are you talking about, the one from ELPA or the one
> I suggest adding to core?
The latter.
> The former doesn't translate to Markdown at all. It simply calls
> pandoc on an Org document to produce something else. It depends on how
> well pandoc's Org importer behaves, i.e, how much Org syntax it does
> support.
>
> Therefore, I suggest to write an Org to native pandoc's syntax. It
> would be derived from "ox-md" but that doesn't mean its name must be
> prefixed with "ox-md",
I'd think it'd make more sense, yes.
> consider, for example "ox-beamer" and "ox-latex".
Even if it's not necessarily like that for all cases.
_My_ point of view is simply to make `ox-pandoc' more visible as an
alternative option when one wants to export to Markdown: simply by
looking at file names, by Googling or by looking at "require" calls used
in other's configs, one would expect that `ox-md' and `ox-md-pandoc'
would both generate "markdown".
For Beamer, it could be similar, except that people don't necessarily
search for "latex" when trying to export to "beamer".
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-02 11:34 ` Nicolas Goaziou
[not found] ` <87ioa2n68f.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
@ 2015-07-02 12:02 ` Rasmus
2015-07-02 14:26 ` Fabrice Popineau
2015-07-02 21:31 ` Nicolas Goaziou
1 sibling, 2 replies; 26+ messages in thread
From: Rasmus @ 2015-07-02 12:02 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Which one are you talking about, the one from ELPA or the one I suggest
> adding to core?
>
> The former doesn't translate to Markdown at all. It simply calls pandoc
> on an Org document to produce something else. It depends on how well
> pandoc's Org importer behaves, i.e, how much Org syntax it does support.
Why do we need a pandoc exporter? And why do we need it in core?
There's already quite a few backends to work on when we want to improve
the general exporter framework. By all means, I'm not against a pandoc
exporter, I'm just trying to understand the reasoning.
Note: my distro doesn't have a binary pandoc package so I have never tried
it.
Rasmus
--
Evidence suggests Snowden used a powerful tool called monospaced fonts
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-02 12:02 ` Rasmus
@ 2015-07-02 14:26 ` Fabrice Popineau
2015-07-02 14:35 ` Rasmus
2015-07-02 21:31 ` Nicolas Goaziou
1 sibling, 1 reply; 26+ messages in thread
From: Fabrice Popineau @ 2015-07-02 14:26 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
2015-07-02 14:02 GMT+02:00 Rasmus <rasmus@gmx.us>:
>
> Why do we need a pandoc exporter? And why do we need it in core?
>
>
To export documents to the epub format and produce ebooks ?
(I certainly would be interested in it).
Emacs could certainly do the job too, but if it is already done ... why
bother ?
Fabrice
[-- Attachment #2: Type: text/html, Size: 723 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-02 14:26 ` Fabrice Popineau
@ 2015-07-02 14:35 ` Rasmus
2015-07-02 14:38 ` Fabrice Popineau
0 siblings, 1 reply; 26+ messages in thread
From: Rasmus @ 2015-07-02 14:35 UTC (permalink / raw)
To: fabrice.popineau; +Cc: emacs-orgmode
Fabrice Popineau <fabrice.popineau@supelec.fr> writes:
> To export documents to the epub format and produce ebooks ?
> (I certainly would be interested in it).
Isn't an EPUB more or less a zipped XHTML project? Wouldn't ox-html +
magic be a shorter and potentially less error prone route to get an epub?
AFAICT, we support everything for EPUB3: XHTML, SVG, CSS and MathML.
ox-odt has magic to zip projects which can be factored out or replicated.
Rasmus
--
I feel emotional landscapes they puzzle me
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-02 12:02 ` Rasmus
2015-07-02 14:26 ` Fabrice Popineau
@ 2015-07-02 21:31 ` Nicolas Goaziou
2015-07-02 22:31 ` Rasmus
1 sibling, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-07-02 21:31 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> Why do we need a pandoc exporter? And why do we need it in core?
Note that I said "would be nice", not "need".
Pandoc has quite a few export formats that we will probably never have
an export back-end for. It avoids re-inventing the wheel.
Also Pandoc can export to Org syntax. It seems fair to allow the
reciprocal.
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
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
0 siblings, 2 replies; 26+ messages in thread
From: Rasmus @ 2015-07-02 22:31 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Note that I said "would be nice", not "need".
OK.
> Pandoc has quite a few export formats that we will probably never have
> an export back-end for. It avoids re-inventing the wheel.
And it is high quality exporter(s)? Are there any exporters in particular
that we need?
I don't see it as reinventing the wheel. One example, does pandoc have
something like the ox filters?
> Also Pandoc can export to Org syntax. It seems fair to allow the
> reciprocal.
I fail to see the logic here.
Anyway, great if somebody wants to work on it.
Thanks,
Rasmus
--
Governments should be afraid of their people
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-02 22:31 ` Rasmus
@ 2015-07-03 10:23 ` Nicolas Goaziou
2015-07-03 16:37 ` Richard Lawrence
1 sibling, 0 replies; 26+ messages in thread
From: Nicolas Goaziou @ 2015-07-03 10:23 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> And it is high quality exporter(s)?
I don't know. However it doesn't matter much for formats we are not
going to provide an export back-end anyway.
> Are there any exporters in particular that we need?
rtf, rst, mediawiki might be useful. I think Bastien wanted to write
"ox-mediawiki.el" at some point.
> I fail to see the logic here.
There is none, but I needed one additional reason to convince myself
I was right.
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
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
1 sibling, 1 reply; 26+ messages in thread
From: Richard Lawrence @ 2015-07-03 16:37 UTC (permalink / raw)
To: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> I don't see it as reinventing the wheel. One example, does pandoc have
> something like the ox filters?
It does; see e.g. http://pandoc.org/scripting.html
Pandoc filters are actually more powerful than Org filters in most
cases, because they are AST transformations. Pattern matching makes it
convenient and practical in Haskell to just transform the part of the
tree you're interested in. And because the Pandoc data structure has a
JSON serialization format, filters can be written in just about any
language, not just Haskell.
This is an nice system, IMHO, which has one big advantage: it is
possible to write complex filters (i.e., those that do more than just
simple string manipulation) in an output-agnostic way. Pandoc filters
can do things which are generally only possible or convenient to do in
Org by creating a derived backend, which isn't output-agnostic.
Best,
Richard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-03 16:37 ` Richard Lawrence
@ 2015-07-03 16:42 ` Nicolas Goaziou
2015-07-03 16:57 ` Rasmus
0 siblings, 1 reply; 26+ messages in thread
From: Nicolas Goaziou @ 2015-07-03 16:42 UTC (permalink / raw)
To: Richard Lawrence; +Cc: emacs-orgmode
Richard Lawrence <richard.lawrence@berkeley.edu> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> I don't see it as reinventing the wheel. One example, does pandoc have
>> something like the ox filters?
>
> It does; see e.g. http://pandoc.org/scripting.html
>
> Pandoc filters are actually more powerful than Org filters in most
> cases, because they are AST transformations. Pattern matching makes it
> convenient and practical in Haskell to just transform the part of the
> tree you're interested in. And because the Pandoc data structure has a
> JSON serialization format, filters can be written in just about any
> language, not just Haskell.
>
> This is an nice system, IMHO, which has one big advantage: it is
> possible to write complex filters (i.e., those that do more than just
> simple string manipulation) in an output-agnostic way. Pandoc filters
> can do things which are generally only possible or convenient to do in
> Org by creating a derived backend, which isn't output-agnostic.
For the record, you can do the same in Org with a parse tree filter.
Other filters are meant to be less powerful but easier to write.
Regards,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: problem with ox-pandoc export
2015-07-03 16:42 ` Nicolas Goaziou
@ 2015-07-03 16:57 ` Rasmus
0 siblings, 0 replies; 26+ messages in thread
From: Rasmus @ 2015-07-03 16:57 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Richard Lawrence <richard.lawrence@berkeley.edu> writes:
>
>> Rasmus <rasmus@gmx.us> writes:
>>
>>> I don't see it as reinventing the wheel. One example, does pandoc have
>>> something like the ox filters?
>>
>> It does; see e.g. http://pandoc.org/scripting.html
>>
>> Pandoc filters are actually more powerful than Org filters in most
>> cases, because they are AST transformations. Pattern matching makes it
>> convenient and practical in Haskell to just transform the part of the
>> tree you're interested in. And because the Pandoc data structure has a
>> JSON serialization format, filters can be written in just about any
>> language, not just Haskell.
>>
>> This is an nice system, IMHO, which has one big advantage: it is
>> possible to write complex filters (i.e., those that do more than just
>> simple string manipulation) in an output-agnostic way. Pandoc filters
>> can do things which are generally only possible or convenient to do in
>> Org by creating a derived backend, which isn't output-agnostic.
>
> For the record, you can do the same in Org with a parse tree filter.
> Other filters are meant to be less powerful but easier to write.
Not to mention the org-export-before filters if you want something that's
still "easy" and in org syntax.
Rasmus
--
Enough with the bla bla!
^ 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).