how to copy, cut and paste in emacs editor

You cannot cut, copy or paste in emacs editor, instead you kill, kill-ring-save, yank and yank-pop. Emacs uses a different terminology for the actions commonly known as cut, copy and paste. There are slight variation in the functionality as well.

For the sake of completeness, you should know how to select a region to perform the cut or copy on as well. You use C-spc to select a region of text in the buffer. Once you have selected a region or a some amount of text, you can:

cut a section of text or region

The command to cut a region or kill a region is kill-region. By default this is mapped to the shortcut C-w, and this will cut the text and put it in the kill ring.

M-x kill-region

copy a section of text or region

To copy text without killing it, use the command kill-ring-save. This will save the region to the kill ring but will not actually kill it or remove it from the buffer.

M-x kill-ring-save

The shortcut for the command is M-w.

paste text

Once you have killed or copied the text into the kill ring, you can now paste it or yank it to another location. The command to do that is yank which will reinsert the text from the kill ring.

M-x yank

The keyboard shortcut to do that is C-y. In addition to the yank which is to paste the last killed text, you can also yank-pop. The yank-pop command will replace the text that was yanked with the previous entry in the kill ring. You can hit M-y repeatedly to paste the desired text from the kill ring.

cua mode

If you have the CUA mode enabled in Emacs, you can use the “standard” key bindings to kill and yank text as you would in other applications. That means that C-x, C-c and C-v can be used to cut, copy and paste in Emacs when a region is selected.