Importing org mode files via opml?

Hi there,

So I’ve got a big project whose current outline lives in an emacs org mode file. I’m trying to import that into scrivener, with the org mode headings as documents.

As the scrivener manual says that OPML files are supported, I first tried to convert my org mode file to OPML using pandoc, and then imported the resulting file. But scrivener gave me the error: “Some files could not be imported because they were of an unsupported type or contained data that could not be read.”

I managed to cook up a workaround by using pandoc to convert the org mode file into markdown, and then import and split the markdown file. But I’m wondering if anyone has gotten OPML to work, or has some better strategy for this?

I just use the standard org-export method with markdown (C-c C-e m m), and then in Scrivener File > Import > Import and Split and choose the appropriate markdown option, which sounds very much what you’ve been doing (without the pandoc). It seems to work well enough. There’s the occasional need to correct the conversion, but all in all it’s not too bad.

May I ask what benefits you are expecting to get from the OPML import instead? The OPML import does work when you’re interlinking with Tinderbox, but I’ve never tried it from org, I’m afraid.

I would think overall that Markdown would be a better result than OPML. I did once use the former approach, and found I had better luck when using “markdown_strict” as the Pandoc output format. Its default conversion was pretty “noisy”, preserving a lot of org-mode stuff that doesn’t really convey well into Scrivener anyway.

As for the OPML though, maybe the Pandoc writer is producing something Scrivener doesn’t like. The format itself never really got a standard for handling bulk text content. The specification only handles headings, but some programs like Scrivener support a loose convention to handle text as well. Since it uses an XML attribute for this, rather than CDATA blocks or element text nodes, it does have limitations—and like I say there is no standard for it. Maybe Pandoc is doing something unexpected here.