all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: ucs-normalize and diacritics
Date: Wed, 25 Jul 2018 21:59:00 +0200	[thread overview]
Message-ID: <87va935bp7.fsf@gmail.com> (raw)
In-Reply-To: <834lgnv0p9.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Jul 2018 17:39:46 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: emacs-devel@gnu.org
>> Date: Wed, 25 Jul 2018 09:40:34 +0200
>> 
>> I think Iʼll start by putting pointers to auto-composition-mode in the
>> manual and lispref.
>
> Thanks in advance.

Hereʼs a first stab at it, intended for emacs-26. Probably the unicode
characters below will not survive intact.

diff --git i/doc/emacs/mule.texi w/doc/emacs/mule.texi
index 401c83dd49..925a582a4c 100644
--- i/doc/emacs/mule.texi
+++ w/doc/emacs/mule.texi
@@ -225,6 +225,51 @@ International Chars
   decomposition: (101 770) ('e' '^')
 @end smallexample
 
+@cindex diacritic
+@cindex composition
+  Sometimes Emacs will display a single character even when the buffer
+contains multiple characters, through a process known as @dfn{composition}.
+This is done via @code{auto-composition-mode}, which is enabled by default,
+and can only be done if the characters to be composed all exist within
+the same font.  The exact rules for which characters to compose are
+defined by the Unicode standard, but generally they concern
+diacritical marks such as accents.
+
+  For a successfully composed character, @kbd{C-u C-x =} displays
+details about the base character and the following character(s) it is
+composed with.  For example for @samp{e} composed with @samp{COMBINING
+CIRCUMFLEX ACCENT}, which visually would be very similar to the
+previous example, the output would look like:
+
+@smallexample
+             position: 146 of 147 (99%), column: 0
+            character: e (displayed as e) (codepoint 101, #o145, #x65)
+    preferred charset: ascii (ASCII (ISO646 IRV))
+code point in charset: 0x65
+               script: latin
+               syntax: w 	which means: word
+             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin,
+                       r:Roman
+             to input: type "C-x 8 RET 65" or "C-x 8 RET LATIN SMALL LETTER E"
+          buffer code: #x65
+            file code: #x65 (encoded by coding system utf-8-unix)
+              display: composed to form "ê" (see below)
+
+Composed with the following character(s) "Ì‚" using this font:
+  xft:-PfEd-DejaVu Sans Mono-normal-normal-normal-*-27-*-*-*-m-0-iso10646-1
+by these glyphs:
+  [0 1 101 72 16 2 15 21 0 nil]
+  [0 1 770 650 0 4 12 22 -17 [-16 0 0]]
+
+Character code properties: customize what to show
+  name: LATIN SMALL LETTER E
+  general-category: Ll (Letter, Lowercase)
+  decomposition: (101) ('e')
+
+There are text properties here:
+  fontified            t
+@end smallexample
+
 @node Language Environments
 @section Language Environments
 @cindex language environments
diff --git i/doc/lispref/nonascii.texi w/doc/lispref/nonascii.texi
index 4d75d6a1f1..c1943dda1c 100644
--- i/doc/lispref/nonascii.texi
+++ w/doc/lispref/nonascii.texi
@@ -500,10 +500,14 @@ Character Properties
 character's classification.  For unassigned codepoints, the value
 is @code{Cn}.
 
+@cindex diacritic
+@cindex composition
 @item canonical-combining-class
 Corresponds to the @code{Canonical_Combining_Class} Unicode property.
 The value is an integer.  For unassigned codepoints, the value
-is zero.
+is zero.  Emacs can use this to visually compose multiple characters,
+using @code{auto-composition-mode}, if all the characters concerned
+exist in the same font.
 
 @cindex bidirectional class of characters
 @item bidi-class



  reply	other threads:[~2018-07-25 19:59 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 18:17 ucs-normalize and diacritics Robert Pluim
2018-07-24 19:07 ` Eli Zaretskii
2018-07-24 19:20   ` Eli Zaretskii
2018-07-24 20:48     ` Robert Pluim
2018-07-25  2:32       ` Eli Zaretskii
2018-07-25  7:40         ` Robert Pluim
2018-07-25 14:39           ` Eli Zaretskii
2018-07-25 19:59             ` Robert Pluim [this message]
2018-07-26 19:47               ` Eli Zaretskii
2018-07-25 14:45           ` Robert Pluim
2018-07-25 14:57             ` Eli Zaretskii
2018-07-26  1:14               ` Richard Stallman
2018-07-26 14:15                 ` Matt Lavallee
2018-07-26 18:42                   ` Eli Zaretskii
2018-07-26 21:01                     ` John Hsieh
2018-07-26 21:54                       ` Stefan Monnier
2018-07-28  3:17                         ` Richard Stallman
2018-07-31  1:09                       ` John Hsieh
2018-07-31 15:22                         ` Eli Zaretskii
2018-07-31 15:27                           ` John Hsieh
2018-07-31 15:45                             ` John Hsieh
2018-07-31 16:33                               ` Eli Zaretskii
2018-07-31 16:28                             ` Eli Zaretskii
2018-07-31 16:30                               ` John Hsieh
2018-07-27  3:21                   ` Richard Stallman
2018-07-27 23:48                     ` John Hsieh
2018-07-26  8:40               ` Robert Pluim
2018-07-26 18:41                 ` Eli Zaretskii
2018-07-26 20:40                   ` Robert Pluim
2018-07-27  5:56                     ` Eli Zaretskii
2018-07-27  6:59                       ` Eli Zaretskii
2018-07-27  8:36                         ` Robert Pluim
2018-07-31 12:37                         ` K. Handa
2018-07-31 15:21                           ` Eli Zaretskii
2018-08-03 14:21                             ` K. Handa
2018-08-03 14:44                               ` Andreas Schwab
2018-08-05 13:22                                 ` K. Handa
2018-08-05 15:28                                   ` Eli Zaretskii
2018-08-06 22:49                                     ` K. Handa
2018-08-11  8:20                                       ` Eli Zaretskii
2018-08-03 17:57                               ` Eli Zaretskii
2018-08-05 13:58                                 ` K. Handa
2018-07-24 20:54   ` Robert Pluim
2018-07-25  2:36     ` Eli Zaretskii
2018-07-25 14:36       ` Eli Zaretskii
2018-07-25 20:11         ` Robert Pluim
2018-07-25 20:21           ` Cesar Crusius
2018-07-25 20:44             ` Robert Pluim
2018-07-25 22:59               ` Cesar Crusius
2018-07-26  8:14                 ` Robert Pluim
2018-07-25 21:01           ` Yuri Khan
2018-07-26  2:41             ` Eli Zaretskii
2018-07-26  2:39           ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va935bp7.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=eliz@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.