سؤال

The case I am presenting right here isn't reproducible everywhere in Emacs but the where I was able reproduce it was in nav when telling it the path of a location to jump to, in both Emacs 24.1.x and 24.3.x.

So the question is why is it that when killing/copying a text, say from the python comments (buffer in python-mode), and yanking/pasting it elsewhere, say the minibuffer, the font-face is also yanked? And why is it that in most cases this is not the case, i.e. the yanked text adopts the font-face of the location where it is yanked?

Another related question: how can we find out which things(meta-data too) were actually killed/copied?

هل كانت مفيدة؟

المحلول

It happens because text color and font are just like any other text property. And properties are copied along with their text by default (simply because they could contain information you DO want to copy).

Don't worry too much about it, this information doesn't get saved into the file, and, in the case of font locking, it's usually overridden quite quickly.

For your last question, you can check the detailed contents of any killed string by looking at the kill ring M-x describe-variable RET kill-ring RET.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top