help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font faces across a copy and paste


From: Sebastien Vauban
Subject: Re: font faces across a copy and paste
Date: Tue, 30 Jul 2013 09:37:45 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

Hi Luca,

Luca Ferrari wrote:
> this is just a curiosity: I noted that if I'm editing a text buffer
> and a code buffer, let's say C/Java, and I copy and paste the code
> from the code buffer into the text one than the pasted text maintains
> the faces (e.g., colors). I was thinking that faces were applied at a
> buffer level, and therefore the code should become faced as a text
> chunk, but apparently Emacs stores faces somewhere in memory related
> to the text chunk itself. Is this correct? There is something I'm
> missing?

AFAIK, fontification can be obtained through either "overlays" or "text
properties".

When overlays, it is in the buffer itself, and not copied across other
buffers.

When text properties, it is a property (face) "attached" to the text, and thus
copied across other buffers.

So, it comes down to how fontification is made in the particular mode or
situation you face.

Best regards,
  Seb

-- 
Sebastien Vauban


reply via email to

[Prev in Thread] Current Thread [Next in Thread]