5

I have a table maintained by org-mode, and I would like to copy/paste it to an email.

So this is what I was trying to do:

  1. export to the plain text

  2. copy/paste to the gmail

However, it just cannot aligned correctly among different columns.. This is something like this:

enter image description here

Could anyone help me on this issue? Thank you!

  • 1
    Best guess: org-mode assumes a monospaced font when it exports, but you're using a non-monospaced font in your email program, which throws off the alignment. – Dan Feb 24 '16 at 17:05
  • 2
    You could export the table to Markdown and use Markdown Here in your email. – Kara Woo Feb 24 '16 at 17:55
  • @KaraWoo, great! This is what I am looking for. Thank you! – lllllllllllll Feb 24 '16 at 18:53
  • @computereasy glad to hear it, I'll go ahead and make this an answer then – Kara Woo Feb 24 '16 at 19:56
7

You can export the table to Markdown and use Markdown Here to format the table in your email.

M-x org-md-export-as-markdown will export your document as Markdown, but the tables will be exported as HTML. This may be fine for your purposes, but if not you can install ox-pandoc and export your org-mode document with M-x org-pandoc-export-as-markdown_github.

This will convert an org table:

| Column 1 | Column 2 |
|----------+----------|
| a        |        1 |
| b        |        2 |
| c        |        3 |

To a Markdown table:

| Column 1 | Column 2 |
|----------|----------|
| a        | 1        |
| b        | 2        |
| c        | 3        |

Paste this table into your email and use Markdown Here (keyboard shortcut: Ctrl-Alt-m) to format it. It should then look like this:

Rendered table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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