From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: font faces across a copy and paste Date: Tue, 30 Jul 2013 16:57:46 +0530 Message-ID: <87d2q0waml.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375183579 3978 80.91.229.3 (30 Jul 2013 11:26:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2013 11:26:19 +0000 (UTC) Cc: help-gnu-emacs To: Luca Ferrari Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 30 13:26:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V484L-0004S8-94 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 13:26:21 +0200 Original-Received: from localhost ([::1]:58502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V484K-0003Ek-PL for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 07:26:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4846-0003De-23 for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 07:26:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4840-0000Wt-7j for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 07:26:05 -0400 Original-Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:48626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4840-0000Wd-1Z for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 07:26:00 -0400 Original-Received: by mail-pa0-f44.google.com with SMTP id jh10so7078223pab.17 for ; Tue, 30 Jul 2013 04:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=NsRFZuNoD8Rxhl2t492YRyuuMJrKxqafe5CNorXQDOI=; b=SGN24et55aBBGXZD73U1a39bZItdYXEUmsqlqZbYht+BiguTYIm4/LSzTs1pNFG3AR Jc7HVJj+X12YWNUHQ0zMkzmUKesdsqYIOOyeCeg7BZZVr7XMttNox1jTieTXwqZ3WdYx h8QgU1KIsCGL10Q7mkDOpsVBF8i5aOfpcikf28t3sfH1P6E7nUizImu+fEEb35Av/rWh 6JTBxIG7PfoHkLP+jZkKmYbI1jS6lKs0G0G/e27NeVyaMI68dAIw3buR7rMwSDrlUO3V PuWQJs2Hfeh2H/Rne2ghYrPYFXbRmiRokVjz4g6EtQnbg+1S1G90ytxvJgTkFKpNQfOk ySEw== X-Received: by 10.68.223.34 with SMTP id qr2mr72605976pbc.75.1375183559284; Tue, 30 Jul 2013 04:25:59 -0700 (PDT) Original-Received: from debian-6.05 ([115.241.0.57]) by mx.google.com with ESMTPSA id dg3sm82523240pbc.24.2013.07.30.04.25.56 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 30 Jul 2013 04:25:58 -0700 (PDT) In-Reply-To: (Luca Ferrari's message of "Tue, 30 Jul 2013 08:30:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22c X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92540 Archived-At: Luca Ferrari writes: > Hi, > 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? When you move the text, the text properties (face is one of the properties) also move with it. 1. Put your cursor on a piece of text. 2. C-u C-x = 3. Go to the end of the resulting buffer. 4. You will see text properties (usually fontified t, and a font-lock-face-*), overlay etc. But when you copy the pasted text in to buffer that has font-lock-mode on, the copied text will usually change colors. This "changing of colors", (I believe) happens very fast that it is barely noticeable. > > Thanks, > Luca