• Stars
    star
    239
  • Rank 168,385 (Top 4 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created about 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mirror of https://git.tecosaur.net/tec/org-pandoc-import

Org Pandoc Import

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

This package aims to reduce this pain by leveraging Pandoc to convert selected file types to org.

There are two tiers of non-org file avoidance:

  1. The basic “get me out of here” — org-pandoc-import-{to,as}-org allows you to easily convert supported non-org files to an org file/buffer with Pandoc
  2. “I don’t even want to see non-org files” — org-pandoc-import-transient-mode is for you
    • (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

org-pandoc-import.svg

Installation

Straight

(use-package org-pandoc-import
  :straight (:host github
             :repo "tecosaur/org-pandoc-import"
             :files ("*.el" "filters" "preprocessors")))

Doom

;; $DOOMDIR/packages.el
(package! org-pandoc-import
  :recipe (:host github
           :repo "tecosaur/org-pandoc-import"
           :files ("*.el" "filters" "preprocessors")))

;; $DOOMDIR/config.el
(use-package! org-pandoc-import :after org)

Dependences

  • Pandoc

That’s the only hard dependency. However ox-pandoc and ox-gfm can be useful for exporting with org-pandoc-import-transient-mode.

That said, as they are currently implemented, the pre-processors for Rmarkdown and TSV files use sed (only really affects Windows users).

Screenshots

screenshots/odt.png

screenshots/markdown.png

screenshots/csv.png

Default backends

markdown
associated with: .md, .markdown
LaTeX
associated with: .tex, .latex
reStructuredText
(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

Currently Rmarkdown and TSV files require sed in order to pre-process the file for Pandoc.

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 available, 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!

More Repositories

1

emacs-config

My configuration for Doom Emacs. Mirror of https://git.tecosaur.net/tec/emacs-config.
Org
1,024
star
2

emacs-everywhere

Mirror of https://git.tecosaur.net/tec/emacs-everywhere
Emacs Lisp
546
star
3

LaTeX-Utilities

An add-on to LaTeX Workshop that provides some features that go beyond the bare essentials
TypeScript
474
star
4

screenshot

Mirror of https://git.tecosaur.net/tec/screenshot.el
Emacs Lisp
225
star
5

BMC

My bespoke, multipurpose class; designed for general use in LaTeX documents.
TeX
209
star
6

LaTeX-auto-activating-snippets

Mirror of https://git.tecosaur.net/tec/LaTeX-auto-activating-snippets
Emacs Lisp
99
star
7

engrave-faces

Mirror of https://git.tecosaur.net/tec/engrave-faces
Emacs Lisp
97
star
8

org-glossary

Mirror of https://git.tecosaur.net/tec/org-glossary
Emacs Lisp
94
star
9

Org.jl

A Julia library for working with Org.
Julia
92
star
10

DataToolkit.jl

Reproducible, flexible, and convenient data management
Julia
83
star
11

lexic

Mirror of https://git.tecosaur.net/tec/lexic
Emacs Lisp
78
star
12

About.jl

Mirror of https://code.tecosaur.net/tec/About.jl
Julia
78
star
13

org-lsp

Allow the unwashed masses to use Org, without using Emacs, using Emacs.
Rust
62
star
14

DotEnv.jl

Get environment variables from .env files in your Julia projects.
Julia
51
star
15

this-month-in-org

A monthly blog on developments with Org
Org
43
star
16

orgmode.org

A little revamp of the orgmode homepage, modern styling without 'modern' JS bloat
SCSS
35
star
17

orgdiff

Mirror of https://git.tecosaur.net/tec/orgdiff
Emacs Lisp
33
star
18

ox-chameleon

Mirror of https://git.tecosaur.net/tec/ox-chameleon
Emacs Lisp
32
star
19

BaseDirs.jl

A cross platform implementation of the XDG Directory Spec
Julia
31
star
20

org-knit-action

Let someone else take care of keeping up to date tangled/woven versions of your Org files for public consumption.
Python
30
star
21

HelpfulMethodErrors.jl

Julia
25
star
22

emacs-survey

Framework for an annual emacs survey. Mirror of https://git.tecosaur.net/tec/emacs-survey.
Julia
16
star
23

ox-pluto

Mirror of https://git.tecosaur.net/tec/ox-pluto
Emacs Lisp
13
star
24

pdftotext.el

A mirror of https://git.tecosaur.net/tec/pdftotext.el
Emacs Lisp
12
star
25

org-music

Mirror of https://git.tecosaur.net/tec/org-music
Emacs Lisp
11
star
26

DataToolkitCore.jl

Prototype foundation for a data management framework
Julia
10
star
27

DaemonConductor.jl

Run many times, compile once.
Julia
10
star
28

DataToolkitCommon.jl

A collection of data tranformers and plugins
Julia
10
star
29

org-tangle-action

Tangle your Org files
Python
9
star
30

ox-ansi

Mirror of https://git.tecosaur.net/tec/ox-ansi
Emacs Lisp
8
star
31

KangarooTwelve.jl

Hashing with hopping
Julia
7
star
32

ZoteroDB.jl

Julia
7
star
33

mu4e-compat

Compatability aliases for mu4e
Emacs Lisp
7
star
34

CheckDoc.jl

Documentation linting
Julia
6
star
35

StyledStrings.jl

Julia
5
star
36

org-latex-preview-todos

A tracker for the Org LaTeX Preview effort on https://git.tecosaur.net/tec/org-mode
4
star
37

TrueRandom.jl

Julia
3
star
38

InteractivePrompts.jl

Multi-modal menus
Julia
3
star
39

DataToolkitDocumenter.jl

Document your data sets
Julia
3
star
40

autocorrect

Mirror of https://code.tecosaur.net/tec/autocorrect
Emacs Lisp
3
star
41

Replete.jl

WIP! An alternative take on OhMyREPL.jl
Julia
2
star
42

quick-testing-vm

Making use of GitHub actions to quickly test things on OSs I don't have easy access to
2
star
43

golgi

My personal server. Mirror of https://git.tecosaur.net/tec/golgi.
Shell
1
star
44

authinfo-color-mode

A simple iteration on `authinfo
Emacs Lisp
1
star
45

julia-nanosoldier-aggregation

Mirror of https://code.tecosaur.net/tec/julia-nanosoldier-aggregation
Julia
1
star
46

mpris.el

Mirror of https://code.tecosaur.net/tec/mpris.el
Emacs Lisp
1
star