From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Devel" <emacs-devel@gnu.org>
Subject: composition text property
Date: Wed, 30 May 2007 09:08:38 -0700 [thread overview]
Message-ID: <BDEIJAFNGDOAGCJIPKPBOELMCEAA.drew.adams@oracle.com> (raw)
>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?
next reply other threads:[~2007-05-30 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-30 16:08 Drew Adams [this message]
2007-06-22 22:51 ` composition text property Drew Adams
2007-06-26 1:32 ` Kenichi Handa
2007-06-26 3:07 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BDEIJAFNGDOAGCJIPKPBOELMCEAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).