2

Any quick way to export an org-mode document into a text file with no formatting and no org markup characters?

I am aware of C-c C-e [t] Export to Plain Text unfortunatly those options add formatting to the document

Header 1
═══════════════════════════════════

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 
eiusmod tempor incididunt ut labore et dolore magna aliqua. 



Header2
────────────────────────────────────────

  ┌────
  │ code block
  └────

The format I'm looking for is:

Header 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 
eiusmod tempor incididunt ut labore et dolore magna aliqua.

Header 2

code block
3
  • What do you want to export exactly? org-mode documents are saved as raw text, if you open them up in another editor that's exactly what you'll see. In emacs, M-x text-mode or even M-x fundamental-mode will remove all syntax-highlighting and show you the raw text.
    – Tyler
    Commented Feb 3, 2017 at 22:10
  • I want to export all the text without any of the org-mode formatting characters.
    – kevzettler
    Commented Feb 3, 2017 at 22:26
  • 2
    I usually put the text in #+BEGIN_EXAMPLE and #+END_EXAMPLE block for no org-mode interference.
    – Emacs User
    Commented Feb 3, 2017 at 22:47

1 Answer 1

3

You could try pandoc, e.g. with ox-pandoc. The command line would be like this:

pandoc -t plain -o outfile.txt YOUR_ORG_FILE.org

The output is:

HEADER 1


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.


Header 2

    code block

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.