Alex Rivera | Logout

Emacs: copying text (without killing it)

Asked 2010-07-01T13:58:41.250
28

In Emacs, how do I copy a region of text (to paste it in another buffer) without killing it (for example: the file I want to copy from is opened in read-only mode, so killing it isn't an option).

Edit
Report

1 Answer

52

Just mark it (C-space at one end of the range, and move to the other end) and use M-w (kill-ring-save):

(kill-ring-save BEG END)

Save the region as if killed, but don't kill it.

answered 2010-07-01T14:01:43.550

Your Answer