GNU bug report logs - #3568
23.0.94; no doc for character composition

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 14 Jun 2009 23:25:04 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3568 in the body.
You can then email your comments to 3568 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3568; Package emacs. (Sun, 14 Jun 2009 23:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 14 Jun 2009 23:25:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.94; no doc for character composition
Date: Sun, 14 Jun 2009 16:17:35 -0700
I can find no doc at all regarding character composition, beyond the
cursory explanation given in the Emacs manual, node Input Methods.
 
In particular, there is nothing in the Elisp manual about it. No
documentation of functions such as `compose-region' and
`compose-chars'.
 
And there is no usage commentary in `composite.el'.
 
How does one compose characters using Emacs Lisp? If characters have
been composed, how do you decompose them? Are there any caveats to be
aware of? Users will have such questions.
 
For example, this snippet is commonly used here and there to display the word
`lambda' as the Greek character:
 
(font-lock-add-keywords
   mode `(("\\<lambda\\>"
   (0 (progn (compose-region (match-beginning 0) (match-end 0)
        ,(make-char 'greek-iso8859-7 107))
      nil)))))
 
But removing that keyword entry from font-lock-keywords, unfontifying, then
refontifying is not sufficient to display `lambda' as a word again. What needs
to be done, to restore the normal display of the word `lambda'?  This kind of
information is missing.
 
Perusing `composite.el', I see that this will do the job:
 
(font-lock-remove-keywords
     nil `(("\\<lambda\\>"
            (0 (progn (compose-region (match-beginning 0) (match-end 0)
                                      ,(make-char 'greek-iso8859-7 107))
                      nil)))))
(save-excursion
   (goto-char (point-min))
   (while (re-search-forward "\\<lambda\\>" nil t)
     (decompose-region (match-beginning 0) (match-end 0))))
 
But it would be helpful to have a little doc in the Elisp manual
explaining how to use character composition. This feature deserves some doc. 

Compare, for example, the doc for font-locking with that for character
composition. Even if these features are not of the same scale, you can see a
qualitative difference in the doc support.

Look at the commentary in file font-lock.el - a section explaining clearly "How
Font Lock mode fontifies", and another section explaining "What is fontification
for?". Plenty of Info doc, in both the Emacs and Elisp manuals.

Character composition should be better documented. I can understand if the
author is not comfortable providing lots of English doc, but someone who
understands character composition should do so. Think in terms of how Emacs
users and Emacs-Lisp users might make use of this feature, then write that up
for those of us who are ignorant.

Thanks.
 
In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600)
 of 2009-05-24 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3568; Package emacs. (Wed, 27 Apr 2016 19:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 3568 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 3568 <at> debbugs.gnu.org
Subject: Re: bug#3568: 23.0.94; no doc for character composition
Date: Wed, 27 Apr 2016 21:23:58 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> I can find no doc at all regarding character composition, beyond the
> cursory explanation given in the Emacs manual, node Input Methods.
>
> In particular, there is nothing in the Elisp manual about it. No
> documentation of functions such as `compose-region' and
> `compose-chars'.
>
> And there is no usage commentary in `composite.el'.
>
> How does one compose characters using Emacs Lisp? If characters have
> been composed, how do you decompose them? Are there any caveats to be
> aware of? Users will have such questions.

`compose-region' has a very long doc string...  And it seems to have
been added to after you wrote this bug report.  Does it answer your
questions now?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3568; Package emacs. (Wed, 27 Apr 2016 19:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 3568 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 3568 <at> debbugs.gnu.org
Subject: RE: bug#3568: 23.0.94; no doc for character composition
Date: Wed, 27 Apr 2016 12:42:56 -0700 (PDT)
> > I can find no doc at all regarding character composition, beyond the
> > cursory explanation given in the Emacs manual, node Input Methods.
> >
> > In particular, there is nothing in the Elisp manual about it. No
> > documentation of functions such as `compose-region' and
> > `compose-chars'.
> >
> > And there is no usage commentary in `composite.el'.
> >
> > How does one compose characters using Emacs Lisp? If characters have
> > been composed, how do you decompose them? Are there any caveats to be
> > aware of? Users will have such questions.
> 
> `compose-region' has a very long doc string...  And it seems to have
> been added to after you wrote this bug report.  Does it answer your
> questions now?

No.  `compose-region' already had that doc string when the bug was
reported.  That doc string has been around since at least Emacs 22.

I would expect some conceptual explanation of character composition
in the Elisp manual.  Including how to decompose composed chars etc.
What the bug report mentions.  I don't think that a doc string for
one command covers this topic.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3568; Package emacs. (Wed, 27 Apr 2016 20:12:02 GMT) Full text and rfc822 format available.

Message #14 received at 3568 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 3568 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#3568: 23.0.94; no doc for character composition
Date: Wed, 27 Apr 2016 23:11:22 +0300
> Date: Wed, 27 Apr 2016 12:42:56 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 3568 <at> debbugs.gnu.org
> 
> No.  `compose-region' already had that doc string when the bug was
> reported.  That doc string has been around since at least Emacs 22.

Then I don't understand what else do you want to know about
compose-region and character composition in general.

> I would expect some conceptual explanation of character composition
> in the Elisp manual.

Please start by explaining what is missing from the doc string of
compose-region, because otherwise it is impossible to translate your
expectation to any concrete text.

The example you gave in the bug report is not about character
composition, it's about font-lock.  So maybe that is what you need to
be explained.  However, the bug report says "character composition",
so until you agree it's about something else, "character composition"
it is.

> Including how to decompose composed chars etc.

You can't.  This question makes no sense.  Character composition
converts several characters into one or more glyphs to be displayed;
you cannot "decompose" them, and in any case the result of such
decomposition is known in advance: they are the original characters.

> What the bug report mentions.  I don't think that a doc string for
> one command covers this topic.

Well, I think it does.  You could change my mind by telling what is it
that you miss in that doc string.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3568; Package emacs. (Wed, 27 Apr 2016 21:19:02 GMT) Full text and rfc822 format available.

Message #17 received at 3568 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 3568 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: RE: bug#3568: 23.0.94; no doc for character composition
Date: Wed, 27 Apr 2016 14:18:20 -0700 (PDT)
> > No.  `compose-region' already had that doc string when the bug was
> > reported.  That doc string has been around since at least Emacs 22.
> 
> Then I don't understand what else do you want to know about
> compose-region and character composition in general.
> 
> > I would expect some conceptual explanation of character composition
> > in the Elisp manual.
> 
> Please start by explaining what is missing from the doc string of
> compose-region, because otherwise it is impossible to translate your
> expectation to any concrete text.
> 
> The example you gave in the bug report is not about character
> composition, it's about font-lock.  So maybe that is what you need to
> be explained.  However, the bug report says "character composition",
> so until you agree it's about something else, "character composition"
> it is.
> 
> > Including how to decompose composed chars etc.
> 
> You can't.  This question makes no sense.  Character composition
> converts several characters into one or more glyphs to be displayed;
> you cannot "decompose" them, and in any case the result of such
> decomposition is known in advance: they are the original characters.
> 
> > What the bug report mentions.  I don't think that a doc string for
> > one command covers this topic.
> 
> Well, I think it does.  You could change my mind by telling what is it
> that you miss in that doc string.

I'd like an explanation of character composition, in the Elisp manual.
If you don't want to add one, or you don't think it is useful for users,
so be it.

As one user, I know nothing about this.  And I still know nothing
about it after reading that doc string.  FWIW.




bug closed, send any further explanations to 3568 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 21:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3568; Package emacs. (Thu, 28 Apr 2016 05:09:01 GMT) Full text and rfc822 format available.

Message #22 received at 3568 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 3568 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#3568: 23.0.94; no doc for character composition
Date: Thu, 28 Apr 2016 08:07:40 +0300
> Date: Wed, 27 Apr 2016 14:18:20 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: larsi <at> gnus.org, 3568 <at> debbugs.gnu.org
> 
> > > What the bug report mentions.  I don't think that a doc string for
> > > one command covers this topic.
> > 
> > Well, I think it does.  You could change my mind by telling what is it
> > that you miss in that doc string.
> 
> I'd like an explanation of character composition, in the Elisp manual.

Would copying the doc string of compose-region into the manual do what
you want?  If not, what in that doc string is missing or not explained
well enough?

> As one user, I know nothing about this.  And I still know nothing
> about it after reading that doc string.  FWIW.

I don't understand this claim.  You certainly know what the doc string
says, which is definitely not "nothing".

Is this a serious bug report?  If it is, would you please help me
understand what is missing in the documentation, by at least answering
my questions, if not by elaborating some more about the problem?  TIA.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.