I'm thoroughly impressed by pandoc. Quite the magnificent program! Using pandoc
and xclip I was able to do what I wanted. As you mentioned, I am able to copy
from, say, a wikipedia page, and paste as (mostly) properly formatted org code.
My code is:
while :; do
xclip -o -selection clipboard -t text/html |
pandoc -r html -w org |
xclip -i -selection clipboard -quiet
done
Thanks!
- Tory
Albert Krewinkel <[email protected]> writes:
> [email protected] (Tory S. Anderson) writes:
>
>> We often read online articles with headings and sometimes subheadings. They
>> may also include bold, italic, and hyperlinks, all of which are supported by
>> Org. Is there any way to preserve this formatting if I copy-paste into
>> org/emacs, the same way it's preserved when I paste into Word or into a
>> Google
>> Document/email? Or is this fundamentally difficult in emacs? It would be a
>> tremendous feature.
>
> A suggestion for a workaround: You might get decent results using
> Pandoc[1] and pandoc-mode[2]. Pandoc can parse HTML and convert it to
> org-mode markup. There is also a helpful answer on stackexchange[3]
> (just replace "markdown" with "org). You might be able to use the above
> tools to integrate the mentioned techniques into org's capture mechanism.
>
> HTH,
> Albert
>
> [1] http://johnmacfarlane.net/pandoc
> [2] https://github.com/joostkremers/pandoc-mode
> [3] http://unix.stackexchange.com/questions/78395/