Subject: bug#56237: 29.0.50; delete-forward-char fails to delete character

From: Eli Zaretskii <[email-masked]>
Date: Sun, 26 Jun 2022 20:26:56 +0300

> From: Visuwesh <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 26 Jun 2022 22:36:31 +0530
> 
> > Invoke find-composition, and you will see that it returns a single
> > composition there.
> 
> If find-composition is indeed right, then the return value is very
> unintuvitive as a native speaker: ப் and போ are two separate characters
> and combining them into a single cluster is weird...  

Maybe you are right, but then Someone(TM) will have to either modify
find-composition or explain how to interpret its return value
differently from what we do now.  What is now in delete-forward-char
expresses my level of knowledge in this area, which admittedly is
limited.

> Am I right in thinking that a grapheme cluster is made up of characters
> that can be grouped together to produce a single "letter" on screen?

The fact that you quote "letter" already means that we have
terminology problem, because I don't think you will be able to define
it rigorously enough for this purpose.

I don't think we have a definition of a grapheme cluster in Emacs
terms that is always correct, given that these decisions are in many
cases delegated to the shaping engine.

> If so, the behaviour of find-composition is still confusing since I
> need to say C-f twice to move over ப்போ.

Could be.  If it confuses too much, you are free to use delete-char to
delete one codepoint at a time.  What delete-forward-char codes is a
convenience feature, so if it is sub-optimal in some rare cases,
that's not a catastrophe, I think.