Subject: Re: bug#64420: string-width of … is 2 in CJK environments

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Aug 2023 08:53:30 +0300

> From: Yuan Fu <[email-masked]>
> Date: Thu, 10 Aug 2023 14:58:37 -0700
> Cc: Dmitry Gutov <[email-masked]>,
>  SUNG TAE KIM <[email-masked]>,
>  [email-masked]
> 
> > OK, this is now installed on master.  We have a new user option named
> > cjk-ambiguous-chars-are-wide; its default is t, but if set to nil, the
> > characters proclaimed by Unicode as "ambiguous" will have char-width
> > of 1, not 2.  Note that this option should be set either via 'setopt'
> > or the Customize interface, not via 'setq'.
> > 
> > Let me know how well this works for you.
> 
> Thanks! I can’t tell you how well it works tho since I don’t use company :-)

You don't need company to see if this works well for you.  Just use
string-width or even char-width with some problematic characters (you
can find the list of them in characters.el, search for "ambiguous"),
and compare the results when this new variable is nil and non-nil.
I'm interested to know how many people need the variable to be non-nil
(its default) to have the width match the fonts they use in Emacs,
both in GUI and in TTY frames, since there's the claim that no one
needs those characters be considered full-width nowadays.  If that
claim is correct, we should consider changing the default value of
this variable in Emacs 30.

TIA