When you copy text from one buffer to another (M-w and C-y) it copy text with font-lock and when you paste it it display with colors from the buffer I copied the text. Is it possible to change that to make it display with font from new buffer?
When you copy and paste text, the terminal does it : you're taking the text that the terminal displays and not the text that is in your emacs app. That's why you have to use terminal keybindings : Ctrl-Shift-C and Ctrl-Shift-V to copy and paste text.
An Emacs copy is the command kill-ring-save (usually bound to M-w ). A system copy is what you typically get from pressing C-c (or choosing "Edit->Copy" in a application window). An X copy is "physically" highlighting text with the mouse cursor. An Emacs paste is the command yank (usually bound to C-y ).
See the doc for user options yank-excluded-properties
and yank-handled-properties
. And start with the doc for yank
: C-h f yank
. It tells you:
When this command inserts text into the buffer, it honors the
`yank-handled-properties' and `yank-excluded-properties'
variables, and the `yank-handler' text property. See
`insert-for-yank-1' for details.
IOW, just tell yank
not to paste properties such as face
and font-lock-face
.
See also the Elisp manual, node Yanking
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With