jkitchin / ox-clip

Copy formatted content from org-mode
67 stars 10 forks source link

Unicode Support? #2

Open georgewsinger opened 6 years ago

georgewsinger commented 6 years ago

This plugin works great for converting pretty output to HTML (so you can, for example, paste to GMail). Are you aware of a way to make it work for unicode copy (so that you could, for example, paste pretty output to a browser search bar)?

jkitchin commented 6 years ago

Can you give me an example here? It looks like unicode pastes here with regular copy paste operations (eg M-w C-y):

¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ

It doesn't seem to work with ox-clip though.

georgewsinger commented 6 years ago

Sure. Consider the snippet \int_a^b f dx. When turning on org-toggle-pretty-entities, this shows up as:

image

Yet when running ox-clip-formatted-copy and pasting into, i.e., this GitHub text entry field, it shows up as 瀼ਾ椦瑮㰻畳㹢㱡猯扵㰾畳㹰㱢猯灵‾⁦硤⼼㹰 (very strange behavior).

jkitchin commented 6 years ago

I guess that is platform specific. On my Mac, nothing pastes at all. I don't know how to paste pretty entities. I did just add ox-clip-image-to-clipboard, which will copy a latex fragment as an image that you can paste.

So $\int_a^b f x$ copies as

image

georgewsinger commented 6 years ago

Weird. On Linux running ox-clip-image-to-clipboard of the snippet $\int_a^b f x$ just copies the text string $\int_a^b f x$.

jkitchin commented 6 years ago

I just tested it on Linux, and got this:

image

It doesn't really make sense to me that it is possible to copy the text string. It is using xclip to copy an image file.