My answer to first question: mark the text in emacs (using either mouse or set mark C-SPC
), and press "<- Backspace" button on keyboard instead of C-w
. This way you can still paste over text in system clipboard, without worrying that the clipboard got overridden by text killed by C-w
Background for this answer: sometimes when I got text outside emacs that I want to use to replace a region in emacs, I often made a mistake by first copying that text into system clipboard (i.e. on Windows Ctrl + C
) , then doing a C-w
in emacs to "delete" the region of text I want to replace, with the hope that a later M-w
could recover my text in clipboard from kill-ring. Unfortunately the clipboard would be simply overridden by text killed by C-w
, and original message in clipboard would never show in kill-ring.
For 2nd question, yes you can always mark the text in emacs first and then directly C-y