Save yourself from non-org formats, thanks to pandoc
Go to file
TEC 0c3013c020 Initial commit 2020-08-16 03:59:51 +08:00
filters Initial commit 2020-08-16 03:59:51 +08:00
preprocessors Initial commit 2020-08-16 03:59:51 +08:00
screenshots Initial commit 2020-08-16 03:59:51 +08:00
LICENCE Initial commit 2020-08-16 03:59:51 +08:00
README.org Initial commit 2020-08-16 03:59:51 +08:00
org-pandoc-import-transient.el Initial commit 2020-08-16 03:59:51 +08:00
org-pandoc-import.el Initial commit 2020-08-16 03:59:51 +08:00
org-pandoc-import.svg Initial commit 2020-08-16 03:59:51 +08:00

README.org

Org Pandoc Import

The worst part about org-mode? Having to leave it.

This package aims to reduce this pain, in using two components:

  1. org-pandoc-import-{to,as}-org allows you to easily import supported non-org files with Pandoc
  2. org-pandoc-import-transient-mode which

    • (via file handlers) intercepts requests for non-org files it knows it can convert
    • uses org-pandoc-import-to-org to convert the file to a temporary org file
    • opens this org file instead
    • exports back to the original non-org file on save

/tec/org-pandoc-import/media/commit/0c3013c020d3817b5fec80ea8e3cc735ea680fed/org-pandoc-import.svg

Screenshots

/tec/org-pandoc-import/media/commit/0c3013c020d3817b5fec80ea8e3cc735ea680fed/screenshots/odt.png

/tec/org-pandoc-import/media/commit/0c3013c020d3817b5fec80ea8e3cc735ea680fed/screenshots/markdown.png

/tec/org-pandoc-import/media/commit/0c3013c020d3817b5fec80ea8e3cc735ea680fed/screenshots/csv.png

Default backends

markdown
associated with: .md, .markdown
LaTeX
associated with: .tex, .latex
reST
(rst) associated with: .rst
ODT
associated with: .odt
DOCX
associated with: .docx
Jupyter Notebooks
(ipynb) associated with: .ipynb
Rmarkdown
(markdown) associated with: .Rmd, .rmd
CSV
associated with: .csv
TSV
(csv) associated with: .tsv

Default transient-mode backends

Please note that this mode is off by default. It is however a global mode, so enable it once in your config and it will be active everywhere.

The active transient backends are determined by org-pandoc-import-transient-associations.

markdown
using Org's gfm export if available, otherwise md
ODT
using Org's odt export
csv, tsv
using org-table-export

When ox-pandoc is avalible, the following formats are also enabled by default, and use ox-pandoc to export.

  • rst
  • docx

Adding new backends

For something supported out of the box by Pandoc, it couldn't be easier — just

(org-pandoc-import-backend foo)

This will add foo to org-pandoc-import-backends, and create the following functions

  • org-pandoc-import-foo-as-org
  • org-pandoc-import-foo-to-org

Which will reference these variables,

  • org-pandoc-import-foo-args
  • org-pandoc-import-foo-filters
  • org-pandoc-import-foo-preprocessors
  • org-pandoc-import-foo-extensions

That last variable will be set to ("foo"), and will cause org-pandoc-import-{to,as}-org to automatically select this backend when called on .foo files.

These all have docstrings — check them out!