6

Every now and then I run into a situation when I need to email a piece of code from emacs. When I paste text into my email program (not emacs), all the color highlighting is lost. This is especially disappointing when pasting from org-mode, which relies heavily on colors for readability. It would be good to preserve font faces.

Is there a way to do this? I am looking for output similar to that of ps-print-buffer-with-faces.

Drew
  • 29,895
  • 7
  • 74
  • 104
user443854
  • 7,096
  • 13
  • 48
  • 63

1 Answers1

6

Suppose your email program can handle html, try M-xhtmlfontify-buffer, which converts the contents of the current buffer (with faces) to css-styled html.

huaiyuan
  • 26,129
  • 5
  • 57
  • 63