From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: composition text property Date: Wed, 30 May 2007 09:08:38 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1180541361 9160 80.91.229.12 (30 May 2007 16:09:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 May 2007 16:09:21 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 30 18:09:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HtQjZ-0007i7-K1 for ged-emacs-devel@m.gmane.org; Wed, 30 May 2007 18:09:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HtQjZ-0002fn-2B for ged-emacs-devel@m.gmane.org; Wed, 30 May 2007 12:09:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HtQjV-0002ff-I4 for emacs-devel@gnu.org; Wed, 30 May 2007 12:09:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HtQjU-0002fQ-R5 for emacs-devel@gnu.org; Wed, 30 May 2007 12:09:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HtQjU-0002fN-OW for emacs-devel@gnu.org; Wed, 30 May 2007 12:09:08 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HtQjU-0008No-Ai for emacs-devel@gnu.org; Wed, 30 May 2007 12:09:08 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l4UG95uM030764 for ; Wed, 30 May 2007 11:09:06 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l4UE12bR000576 for ; Wed, 30 May 2007 10:09:05 -0600 Original-Received: from dhcp-amer-whq-csvpn-gw3-141-144-82-91.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 2742632981180541322; Wed, 30 May 2007 09:08:42 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:71991 Archived-At: >>From the Elisp manual, node Special Properties, `composition': This text property is used to display a sequence of characters as a single glyph composed from components. For instance, in Thai a base consonant is composed with the following combining vowel as a single glyph. The value should be a character or a sequence (vector, list, or string) of integers. * If it is a character, it means to display that character instead of the text in the region. * If it is a string, it means to display that string's contents instead of the text in the region. * If it is a vector or list, the elements are characters interleaved with internal codes specifying how to compose the following character with the previous one. I must be misunderstanding this - perhaps someone can explain. I try this: (put-text-property (point) (1+ (point)) 'composition "Hi there!") I expected to see "Hi there!" displayed in place of the character before point ("display that strings contents instead of the text..."). Instead, I see no visible change. `C-u C-x =' shows that the composition property was applied. I also tried applying the property this way to several consecutive characters (expecting to see "Hi there!" in place of each), but with no visible change. I also tried looking at Emacs source code that uses this property, but I didn't find much, and what I found didn't enlighten me. What am I missing? Thx. BTW, should the text really be speaking of "the region" here? I tried with and without an active region, with no visible change. I suspect that this has nothing to do with the region, and I'd file a bug, but I don't yet understand this text (obviously). Shouldn't "the region" be "the characters with property `composition'"? Also, the illustration of Thai doesn't help (me) much. How about a code example, showing how `composition' can be used to compose a Thai consonant and its following vowel, forming a single glyph?