From mboxrd@z Thu Jan 1 00:00:00 1970 From: Du Yanning Subject: org-src-font-lock-fontify-block does NOT copy the default face Date: Tue, 26 Apr 2011 11:09:40 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=005045016d9ea7d82b04a1c9a736 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEYek-0005Br-7P for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 23:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEYej-0001DS-8b for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 23:09:42 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:65108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEYej-0001DO-5l for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 23:09:41 -0400 Received: by iyh42 with SMTP id 42so235972iyh.0 for ; Mon, 25 Apr 2011 20:09:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --005045016d9ea7d82b04a1c9a736 Content-Type: text/plain; charset=ISO-8859-1 when org-src-font-lock-fontify-block copies text from the buffer named " org-src-fontification:c++-mode" to code block, #+BEGIN_SRC c++ void foo() { } #+END_SRC it copies face text properties of strings at the same time. However, face text property relies on the default face of the source buffer. If the default face of the source buffer and the default face of the target buffer is different, text in source blocks will have different appearances than the source buffer depending on the default faces. Also, if I use buffer-face-set in the org-mode buffer, text in code block will change too. I think it is better to incorporate the default face of c++-mode buffer to the face of text in code block in org-mode buffer when copy string using org-src-font-lock-fontify-block. --005045016d9ea7d82b04a1c9a736 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable when org-src-font-lock-fontify-block copies text from the buffer named &quo= t; org-src-fontification:c++-mode" to code block,
#+BEGIN_SRC c++ =A0 void foo()
=A0 {
=A0 }
#+END_SRC
it copies face text properties of strings at the same time.However, face text property relies on the default face of the source buffe= r.
If the default face of the source buffer and the default face of the = target buffer is different,
text in source blocks will have different appearances than the source buffe= r depending on the default faces.

Also, if=A0 I use buffer-face-set = in the org-mode buffer, text in code block will change too.

I think = it is better to incorporate the default face of c++-mode buffer to the face= of text in code block in
org-mode buffer when copy string using org-src-font-lock-fontify-block.
--005045016d9ea7d82b04a1c9a736--