Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to copy text from emacs with faces in Windows?

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.

like image 264
user443854 Avatar asked Mar 20 '12 21:03

user443854


People also ask

How do I copy and paste from outside in emacs?

Every time you select a piece of text with the mouse, the selected text is set as the PRIMARY selection. Using the copy function will place the selected text into the CLIPBOARD. Pasting using the middle mouse button will insert the PRIMARY selection. Pasting using the yank/paste functions will insert the CLIPBOARD.

How do I paste from emacs to clipboard?

Kill (Cut), Copy, and Yank (Paste) Commands in Emacs To cut, or kill, the text, you can use the keys Ctrl + k to kill a particular line, or the Ctrl + w command to kill the entire selected region. To paste, or yank, the text, press the keys Ctrl + y.


1 Answers

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.

like image 69
huaiyuan Avatar answered Oct 16 '22 03:10

huaiyuan