all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71822: Feature request: fullwidth to halfwidth
@ 2024-06-28  9:06 Dan Jacobson
  2024-06-28 13:45 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Jacobson @ 2024-06-28  9:06 UTC (permalink / raw)
  To: 71822

M-l runs the command downcase-word.
That's great. But here's a feature request:
Have commands that can change wide to narrow,
with the same ease as M-l.
E.g., change 209M into 209M.
and another command to do the opposite.
OK, I guess they are called fullwidth and halfwidth.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-28  9:06 bug#71822: Feature request: fullwidth to halfwidth Dan Jacobson
@ 2024-06-28 13:45 ` Eli Zaretskii
  2024-06-30  4:04   ` Dan Jacobson
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2024-06-28 13:45 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71822

> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Fri, 28 Jun 2024 17:06:55 +0800
> 
> M-l runs the command downcase-word.
> That's great. But here's a feature request:
> Have commands that can change wide to narrow,
> with the same ease as M-l.
> E.g., change 209M into 209M.
> and another command to do the opposite.
> OK, I guess they are called fullwidth and halfwidth.

When would such commands be useful?  These characters are deliberately
not the same, and not just different shapes of the same letters
(unlike upper-case and lower-case letters).





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-28 13:45 ` Eli Zaretskii
@ 2024-06-30  4:04   ` Dan Jacobson
  2024-06-30  5:24     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Jacobson @ 2024-06-30  4:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71822

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>> Have commands that can change wide to narrow,
>> with the same ease as M-l.
>> E.g., change 209M into 209M.
>> and another command to do the opposite.
>> OK, I guess they are called fullwidth and halfwidth.

EZ> When would such commands be useful?

We use them all the time in Chinese,
請由209M號門        Ugly
請由209M號門    Pretty

EZ> These characters are deliberately
EZ> not the same, and not just different shapes of the same letters
EZ> (unlike upper-case and lower-case letters).

$ unicode 209M|grep Deco
Decomposition: <wide> 0032
Decomposition: <wide> 0030
Decomposition: <wide> 0039
Decomposition: <wide> 004D





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  4:04   ` Dan Jacobson
@ 2024-06-30  5:24     ` Eli Zaretskii
  2024-06-30  8:23       ` Dan Jacobson
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2024-06-30  5:24 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71822

> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 71822@debbugs.gnu.org
> Date: Sun, 30 Jun 2024 12:04:07 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> >> Have commands that can change wide to narrow,
> >> with the same ease as M-l.
> >> E.g., change 209M into 209M.
> >> and another command to do the opposite.
> >> OK, I guess they are called fullwidth and halfwidth.
> 
> EZ> When would such commands be useful?
> 
> We use them all the time in Chinese,
> 請由209M號門        Ugly
> 請由209M號門    Pretty

That's about use of the characters, not about the use cases for the
commands you proposed.  Or maybe I don't understand the example, in
which case please elaborate.

> EZ> These characters are deliberately
> EZ> not the same, and not just different shapes of the same letters
> EZ> (unlike upper-case and lower-case letters).
> 
> $ unicode 209M|grep Deco
> Decomposition: <wide> 0032
> Decomposition: <wide> 0030
> Decomposition: <wide> 0039
> Decomposition: <wide> 004D

Yes, and..?

I didn't ask whether Emacs has the requisite information, I asked
about the use cases for these commands.  You presented none; instead,
you are lecturing me on basic Unicode attributes of characters and on
the reasons for having the wide ones.  That is not helpful; I already
know all that.  It definitely doesn't provide any rationale for having
such commands in Emacs.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  5:24     ` Eli Zaretskii
@ 2024-06-30  8:23       ` Dan Jacobson
  2024-06-30  8:30         ` Eli Zaretskii
  2024-06-30  9:43         ` Kazuhiro Ito
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Jacobson @ 2024-06-30  8:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71822

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> use cases for these commands

All offline (I. e. all by hand), I start out with English,

1. Her ID number is 0987654321BA.

I rewrite the first part in Chinese,

2. 她證號為 0987654321BA 。

But to get it into its final state,

3. 她證號為098...

I need to retype each and every number and letter "all over again" (but
in fullwidth), because there is no M-<something> command to change it
for me. As you see I have given up halfway.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  8:23       ` Dan Jacobson
@ 2024-06-30  8:30         ` Eli Zaretskii
  2024-06-30 13:45           ` Dan Jacobson
  2024-06-30  9:43         ` Kazuhiro Ito
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2024-06-30  8:30 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71822

> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 71822@debbugs.gnu.org
> Date: Sun, 30 Jun 2024 16:23:45 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> EZ> use cases for these commands
> 
> All offline (I. e. all by hand), I start out with English,
> 
> 1. Her ID number is 0987654321BA.
> 
> I rewrite the first part in Chinese,
> 
> 2. 她證號為 0987654321BA 。
> 
> But to get it into its final state,
> 
> 3. 她證號為098...
> 
> I need to retype each and every number and letter "all over again" (but
> in fullwidth), because there is no M-<something> command to change it
> for me. As you see I have given up halfway.

You are saying that the keyboard and/or the input method you are using
to type Chinese support characters such as 她證號為, but don't support
typing wide digits like 098, is that the problem?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  8:23       ` Dan Jacobson
  2024-06-30  8:30         ` Eli Zaretskii
@ 2024-06-30  9:43         ` Kazuhiro Ito
  2024-06-30 13:55           ` Dan Jacobson
  1 sibling, 1 reply; 11+ messages in thread
From: Kazuhiro Ito @ 2024-06-30  9:43 UTC (permalink / raw)
  To: 71822; +Cc: Eli Zaretskii, Dan Jacobson

> EZ> use cases for these commands
> 
> All offline (I. e. all by hand), I start out with English,
> 
> 1. Her ID number is 0987654321BA.
> 
> I rewrite the first part in Chinese,
> 
> 2. 她證號為 0987654321BA 。
> 
> But to get it into its final state,
> 
> 3. 她證號為098...
> 
> I need to retype each and every number and letter "all over again" (but
> in fullwidth), because there is no M-<something> command to change it
> for me. As you see I have given up halfway.

FYI, We have japanese-hankaku[-region] and japanese-zenkaku[-region]
functions, which convert hankaku (halfwidth) and zenkaku (fullwidth)
characters to one another.  It is useful to normalize mixed text
mainly input by someone not me, though these functions don't support
all characters because they are for traditional Japanese character
set.


> japanese-hankaku is an autoloaded native-comp-function in
> ‘japan-util.el’.
>
> (japanese-hankaku OBJ &optional ASCII-ONLY)
>
> Convert argument to ‘hankaku’ and return that.
> The argument may be a character or string.  The result has the same type.
> The argument object is not altered--the value is a copy.
> Optional argument ASCII-ONLY non-nil means to return only ASCII character.

-- 
Kazuhiro Ito

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  8:30         ` Eli Zaretskii
@ 2024-06-30 13:45           ` Dan Jacobson
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Jacobson @ 2024-06-30 13:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71822

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> You are saying that the keyboard and/or the input method you are using
EZ> to type Chinese support characters such as 她證號為, but don't support
EZ> typing wide digits like 098, is that the problem?

No. It's the difference between needing to type

0987654321BA

i.e.,

 C-\                     ;; toggle-input-method
 v 0 v                   ;; self-insert-command
 9 v                     ;; self-insert-command
 8 v                     ;; self-insert-command
 7 v                     ;; self-insert-command
 6 v                     ;; self-insert-command
 5 v                     ;; self-insert-command
 4 v                     ;; self-insert-command
 3 v                     ;; self-insert-command
 2 v                     ;; self-insert-command
 1 v                     ;; self-insert-command
 B                       ;; self-insert-command
 v A                     ;; self-insert-command

vs. just M-<one character>.

It's just like to turn this sentence into upper case,
one needs to type each letter again, holding the shift button,
because upcase-region hasn't been invented yet.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30  9:43         ` Kazuhiro Ito
@ 2024-06-30 13:55           ` Dan Jacobson
  2024-07-01  2:13             ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Jacobson @ 2024-06-30 13:55 UTC (permalink / raw)
  To: Kazuhiro Ito; +Cc: Eli Zaretskii, 71822

Indeed,
japanese-hankaku-region
japanese-zenkaku-region
work. So maybe they should
be available as
halfwidth-woed
halfwidth-region
fullwidth-word
fullwidth-region etc.
in emacs -Q.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-06-30 13:55           ` Dan Jacobson
@ 2024-07-01  2:13             ` Stefan Kangas
  2024-07-01  9:58               ` Dan Jacobson
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2024-07-01  2:13 UTC (permalink / raw)
  To: Dan Jacobson, Kazuhiro Ito; +Cc: Eli Zaretskii, 71822

Dan Jacobson <jidanni@jidanni.org> writes:

> Indeed,
> japanese-hankaku-region
> japanese-zenkaku-region
> work. So maybe they should
> be available as
> halfwidth-woed
> halfwidth-region
> fullwidth-word
> fullwidth-region etc.
> in emacs -Q.

Do they work for the full set of Chinese characters?

I'm asking because Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:

> [...] these functions don't support all characters because they are
> for traditional Japanese character set.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#71822: Feature request: fullwidth to halfwidth
  2024-07-01  2:13             ` Stefan Kangas
@ 2024-07-01  9:58               ` Dan Jacobson
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Jacobson @ 2024-07-01  9:58 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Eli Zaretskii, Kazuhiro Ito, 71822

All I am ever concerned with is just ASCII.

All I know is if it hits a Chinese character, it should just leave it 
untouched, no matter if converting to or converting from.

On 2024-07-01 10:13, Stefan Kangas wrote:
> Dan Jacobson <jidanni@jidanni.org> writes:
> 
>> Indeed,
>> japanese-hankaku-region
>> japanese-zenkaku-region
>> work. So maybe they should
>> be available as
>> halfwidth-woed
>> halfwidth-region
>> fullwidth-word
>> fullwidth-region etc.
>> in emacs -Q.
> 
> Do they work for the full set of Chinese characters?
> 
> I'm asking because Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> 
>> [...] these functions don't support all characters because they are
>> for traditional Japanese character set.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-01  9:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28  9:06 bug#71822: Feature request: fullwidth to halfwidth Dan Jacobson
2024-06-28 13:45 ` Eli Zaretskii
2024-06-30  4:04   ` Dan Jacobson
2024-06-30  5:24     ` Eli Zaretskii
2024-06-30  8:23       ` Dan Jacobson
2024-06-30  8:30         ` Eli Zaretskii
2024-06-30 13:45           ` Dan Jacobson
2024-06-30  9:43         ` Kazuhiro Ito
2024-06-30 13:55           ` Dan Jacobson
2024-07-01  2:13             ` Stefan Kangas
2024-07-01  9:58               ` Dan Jacobson

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.