* org-cite and pandoc
@ 2021-08-05 14:01 Eric S Fraga
2021-08-05 14:13 ` Bruce D'Arcus
0 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 14:01 UTC (permalink / raw)
To: Emacs Org mode mailing list
Dear list,
I am needing to export a document, written in org using the new cite
syntax, to pandoc (native). The export fails. I realise that org-cite
is new and I don't expect the export to process any [cite:@key] lines
properly but it would be good to have the export at least generate a
pandoc file I can then work with. Is this possible?
I recognise fully that ox-pandoc is in contrib so I don't expect
anything as such! In the meantime, I'll simply remove all [cite:]
entries but I thought I'd raise this issue.
The error (with paths elided and lines truncated) I get is:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp ("..."))
split-string(("...") "\n")
(cons (car it) (split-string val "\n"))
(list (cons (car it) (split-string val "\n")))
(progn (list (cons (car it) (split-string val "\n"))))
(if val (progn (list (cons (car it) (split-string val "\n")))))
(let ((val (plist-get info (cdr it)))) (if val (progn (list (cons (car it) (split-string val "\n"))))))
(closure ((info :export-options nil :back-end ...
mapcar((closure ((info :export-options nil :back-end #s(org-export-backend :name pandoc
(apply 'append (mapcar #'(lambda (it) (ignore it) (let ((val (plist-get info ...)))
(org-pandoc-put-options (apply 'append (mapcar #'(lambda (it) (ignore it)
org-pandoc-template(#("#+cite_export: natbi..." [...]))
org-export-as(pandoc nil nil nil (:output-file "paper.tmpLAj6YU.org"))
org-export-to-file(pandoc "paper.tmpLAj6YU.org"
org-pandoc-export(native nil nil nil nil nil 0)
org-pandoc-export-to-native-and-open(nil nil nil nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
command-execute(org-export-dispatch)
--8<---------------cut here---------------end--------------->8---
Thank you,
eric
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 14:01 org-cite and pandoc Eric S Fraga
@ 2021-08-05 14:13 ` Bruce D'Arcus
2021-08-05 14:41 ` Eric S Fraga
0 siblings, 1 reply; 12+ messages in thread
From: Bruce D'Arcus @ 2021-08-05 14:13 UTC (permalink / raw)
To: Org Mode List
Yeah, ideally ox-pandoc would be updated to support org-cite.
I also, FYI, submitted an issue to pandoc awhile ago to update it's
org-cite support (it has support for an early draft).
https://github.com/jgm/pandoc/issues/7329
On Thu, Aug 5, 2021 at 10:07 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> Dear list,
>
> I am needing to export a document, written in org using the new cite
> syntax, to pandoc (native). The export fails. I realise that org-cite
> is new and I don't expect the export to process any [cite:@key] lines
> properly but it would be good to have the export at least generate a
> pandoc file I can then work with. Is this possible?
>
> I recognise fully that ox-pandoc is in contrib so I don't expect
> anything as such! In the meantime, I'll simply remove all [cite:]
> entries but I thought I'd raise this issue.
>
> The error (with paths elided and lines truncated) I get is:
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument stringp ("..."))
> split-string(("...") "\n")
> (cons (car it) (split-string val "\n"))
> (list (cons (car it) (split-string val "\n")))
> (progn (list (cons (car it) (split-string val "\n"))))
> (if val (progn (list (cons (car it) (split-string val "\n")))))
> (let ((val (plist-get info (cdr it)))) (if val (progn (list (cons (car it) (split-string val "\n"))))))
> (closure ((info :export-options nil :back-end ...
> mapcar((closure ((info :export-options nil :back-end #s(org-export-backend :name pandoc
> (apply 'append (mapcar #'(lambda (it) (ignore it) (let ((val (plist-get info ...)))
> (org-pandoc-put-options (apply 'append (mapcar #'(lambda (it) (ignore it)
> org-pandoc-template(#("#+cite_export: natbi..." [...]))
> org-export-as(pandoc nil nil nil (:output-file "paper.tmpLAj6YU.org"))
> org-export-to-file(pandoc "paper.tmpLAj6YU.org"
> org-pandoc-export(native nil nil nil nil nil 0)
> org-pandoc-export-to-native-and-open(nil nil nil nil)
> org-export-dispatch(nil)
> funcall-interactively(org-export-dispatch nil)
> command-execute(org-export-dispatch)
> --8<---------------cut here---------------end--------------->8---
>
>
> Thank you,
> eric
>
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
> : Latest paper written in org: https://arxiv.org/abs/2106.05096
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 14:13 ` Bruce D'Arcus
@ 2021-08-05 14:41 ` Eric S Fraga
2021-08-05 15:00 ` András Simonyi
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 14:41 UTC (permalink / raw)
To: Bruce D'Arcus; +Cc: Org Mode List
On Thursday, 5 Aug 2021 at 10:13, Bruce D'Arcus wrote:
> Yeah, ideally ox-pandoc would be updated to support org-cite.
Indeed but even exporting without error would be good, assuming of
course that the error I reported is actually due to org-cite. It might
not be; I've never exported to pandoc before! This is for a journal
that expects submissions in pandoc (never had this before) which (in
some ways) is nice as at least it's not Word...
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 14:41 ` Eric S Fraga
@ 2021-08-05 15:00 ` András Simonyi
2021-08-05 15:27 ` Eric S Fraga
` (2 more replies)
2021-08-05 15:29 ` Bruce D'Arcus
2021-08-05 15:34 ` Eric S Fraga
2 siblings, 3 replies; 12+ messages in thread
From: András Simonyi @ 2021-08-05 15:00 UTC (permalink / raw)
To: Org Mode List; +Cc: Bruce D'Arcus
Perhaps a useful workaround would be to first "export to Org" (with
org-org-export-as-org)?
AFAICS this replaces the Org cites with their export
processor-rendered counterparts, e.g.,
with suitable Natbib cite commands when the
#+cite_export: natbib
line is used.
best regards,
András
On Thu, 5 Aug 2021 at 16:41, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Indeed but even exporting without error would be good, assuming of
> course that the error I reported is actually due to org-cite. It might
> not be; I've never exported to pandoc before! This is for a journal
> that expects submissions in pandoc (never had this before) which (in
> some ways) is nice as at least it's not Word...
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
> : Latest paper written in org: https://arxiv.org/abs/2106.05096
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 15:00 ` András Simonyi
@ 2021-08-05 15:27 ` Eric S Fraga
2021-08-05 15:32 ` Eric S Fraga
2021-08-05 15:38 ` Eric S Fraga
2 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 15:27 UTC (permalink / raw)
To: András Simonyi; +Cc: Bruce D'Arcus, Org Mode List
On Thursday, 5 Aug 2021 at 17:00, András Simonyi wrote:
> Perhaps a useful workaround would be to first "export to Org" (with
> org-org-export-as-org)?
Excellent suggestion! Thank you.
Doing so clearly indicates that my problem is *not* with org-cite but
with ox-pandoc. Strange.
I had mentioned that ox-pandoc was in org-contrib; it is not. It is in
MELPA.
Okay, I will need to investigate further. There must be something in my
configuration that is affecting ox-pandoc as others seem to be using it
just fine.
Thanks again,
eric
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 14:41 ` Eric S Fraga
2021-08-05 15:00 ` András Simonyi
@ 2021-08-05 15:29 ` Bruce D'Arcus
2021-08-05 15:37 ` Eric S Fraga
2021-08-05 15:34 ` Eric S Fraga
2 siblings, 1 reply; 12+ messages in thread
From: Bruce D'Arcus @ 2021-08-05 15:29 UTC (permalink / raw)
To: Org Mode List
On Thu, Aug 5, 2021 at 10:41 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> This is for a journal that expects submissions in pandoc (never had this before) which (in
> some ways) is nice as at least it's not Word...
Never heard of that before either; very cool!
Bruce
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 15:00 ` András Simonyi
2021-08-05 15:27 ` Eric S Fraga
@ 2021-08-05 15:32 ` Eric S Fraga
2021-08-05 15:38 ` Eric S Fraga
2 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 15:32 UTC (permalink / raw)
To: András Simonyi; +Cc: Bruce D'Arcus, Org Mode List
After some investigation...
It seems that the presence of the #+bibliography: line is what causes
ox-pandoc to fail. Removing this line is sufficient for me to get the
export working.
Thanks again,
eric
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 14:41 ` Eric S Fraga
2021-08-05 15:00 ` András Simonyi
2021-08-05 15:29 ` Bruce D'Arcus
@ 2021-08-05 15:34 ` Eric S Fraga
2 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 15:34 UTC (permalink / raw)
To: Org Mode List
On Thursday, 5 Aug 2021 at 15:41, Eric S Fraga wrote:
> that expects submissions in pandoc (never had this before) which (in
Ignore this, by the way; I meant to type markdown, not pandoc.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 15:29 ` Bruce D'Arcus
@ 2021-08-05 15:37 ` Eric S Fraga
0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 15:37 UTC (permalink / raw)
To: Bruce D'Arcus; +Cc: Org Mode List
On Thursday, 5 Aug 2021 at 11:29, Bruce D'Arcus wrote:
> Never heard of that before either; very cool!
See my update... <blush> markdown, not pandoc. Although pandoc's native
format is quite useful, just not readable. ;-)
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 15:00 ` András Simonyi
2021-08-05 15:27 ` Eric S Fraga
2021-08-05 15:32 ` Eric S Fraga
@ 2021-08-05 15:38 ` Eric S Fraga
2021-08-07 20:09 ` Nicolas Goaziou
2 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2021-08-05 15:38 UTC (permalink / raw)
To: András Simonyi; +Cc: Bruce D'Arcus, Org Mode List
By the way, ox-md also fails if there is a #+bibliography
line. Removing it allows for the export. Very strange.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-05 15:38 ` Eric S Fraga
@ 2021-08-07 20:09 ` Nicolas Goaziou
2021-08-09 12:16 ` Eric S Fraga
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2021-08-07 20:09 UTC (permalink / raw)
To: Org Mode List
Hello,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> By the way, ox-md also fails if there is a #+bibliography
> line. Removing it allows for the export. Very strange.
Would you have an ECM? I cannot reproduce it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org-cite and pandoc
2021-08-07 20:09 ` Nicolas Goaziou
@ 2021-08-09 12:16 ` Eric S Fraga
0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-08-09 12:16 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
On Saturday, 7 Aug 2021 at 22:09, Nicolas Goaziou wrote:
> Would you have an ECM? I cannot reproduce it.
Unfortunately, I cannot reproduce it with emacs -Q [1]. Has to be
something in my configuration but I have no idea what. No time at
present to bisect etc. but I will in due course hopefully.
Sorry for the noise.
thank you,
eric
Footnotes:
[1] the one real disadvantage of using Emacs as my window manager,
i.e. exwm, is the hassle involved in actually running Emacs with
-Q. :-(
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-617-g926dba
: Latest paper written in org: https://arxiv.org/abs/2106.05096
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-08-09 12:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-05 14:01 org-cite and pandoc Eric S Fraga
2021-08-05 14:13 ` Bruce D'Arcus
2021-08-05 14:41 ` Eric S Fraga
2021-08-05 15:00 ` András Simonyi
2021-08-05 15:27 ` Eric S Fraga
2021-08-05 15:32 ` Eric S Fraga
2021-08-05 15:38 ` Eric S Fraga
2021-08-07 20:09 ` Nicolas Goaziou
2021-08-09 12:16 ` Eric S Fraga
2021-08-05 15:29 ` Bruce D'Arcus
2021-08-05 15:37 ` Eric S Fraga
2021-08-05 15:34 ` Eric S Fraga
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).