* bug#71411: 30.0.50; Show Unicode names when describing translations
@ 2024-06-07 10:32 Robert Pluim
2024-06-07 11:08 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-06-07 10:32 UTC (permalink / raw)
To: 71411
'C-x 8 RET' will show Unicode names when it shows completions, which
helps people find the complete name of the character they want to use.
I have a patch to do something similar for 'C-h k' and 'C-h b' (for
translated keys only), so youʼd get
'C-h k C-x 8 E' =>
€ 'EURO SIGN' (translated from C-x 8 E)
Since the purpose of this is to provide more information by default in
situations where people are searching for answers, I
donʼt think this needs a configuration variable, unlike the analogous
feaure in 'what-cursor-position'. (yes, people can hit 'C-u C-x =' in
the *Help* buffer, but first they have to know about that).
Patch to follow when I have the bug number.
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 10:32 bug#71411: 30.0.50; Show Unicode names when describing translations Robert Pluim
@ 2024-06-07 11:08 ` Eli Zaretskii
2024-06-07 12:16 ` Robert Pluim
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2024-06-07 11:08 UTC (permalink / raw)
To: Robert Pluim; +Cc: 71411
> From: Robert Pluim <rpluim@gmail.com>
> Date: Fri, 07 Jun 2024 12:32:58 +0200
>
>
> 'C-x 8 RET' will show Unicode names when it shows completions, which
> helps people find the complete name of the character they want to use.
>
> I have a patch to do something similar for 'C-h k' and 'C-h b' (for
> translated keys only), so youʼd get
>
> 'C-h k C-x 8 E' =>
>
> € 'EURO SIGN' (translated from C-x 8 E)
>
> Since the purpose of this is to provide more information by default in
> situations where people are searching for answers, I
> donʼt think this needs a configuration variable, unlike the analogous
> feaure in 'what-cursor-position'. (yes, people can hit 'C-u C-x =' in
> the *Help* buffer, but first they have to know about that).
Does this mean that if I type "C-h k a" I will be told that a is LATIN
SMALL LETTER A? That'd be an annoyance, I think.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 11:08 ` Eli Zaretskii
@ 2024-06-07 12:16 ` Robert Pluim
2024-06-07 13:42 ` Eli Zaretskii
2024-06-07 14:01 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 13+ messages in thread
From: Robert Pluim @ 2024-06-07 12:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 71411
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
>>>>> On Fri, 07 Jun 2024 14:08:33 +0300, Eli Zaretskii <eliz@gnu.org> said:
Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
Eli> SMALL LETTER A? That'd be an annoyance, I think.
Thatʼs not a translated binding, so no.
Let me attach the patches.
Robert
--
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-char-to-name-convenience-function.patch --]
[-- Type: text/x-diff, Size: 2554 bytes --]
From 847d582f89110f8c2f0e88c1533ced0606970fba Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Fri, 7 Jun 2024 12:05:34 +0200
Subject: [PATCH 1/3] Add 'char-to-name' convenience function
To: emacs-devel@gnu.org
* lisp/international/mule-cmds.el (char-to-name): New function. This is
the inverse of 'char-from-name'.
* doc/lispref/nonascii.texi (Character Codes): Document it.
* etc/NEWS: Announce it.
---
doc/lispref/nonascii.texi | 5 +++++
etc/NEWS | 4 ++++
lisp/international/mule-cmds.el | 7 +++++++
3 files changed, 16 insertions(+)
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index b33082e2b24..195b818c0bd 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -435,6 +435,11 @@ Character Codes
@end example
@end defun
+@defun char-to-name char
+This function returns the Unicode name of @var{char}. Returns
+@code{nil} if @var{char} is not a character or has no Unicode name.
+@end defun
+
@defun get-byte &optional pos string
This function returns the byte at character position @var{pos} in the
current buffer. If the current buffer is unibyte, this is literally
diff --git a/etc/NEWS b/etc/NEWS
index 5fb1625a76c..c63e231f44f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2186,6 +2186,10 @@ it returns a short "unique" string that identifies the function.
In either case, the string is propertized so clicking on it gives
further details.
+** New function 'char-to-name'.
+This is a convenience function to return the Unicode name of a char (if
+it has one).
+
** New function 'cl-type-of'.
This function is like 'type-of' except that it sometimes returns
a more precise type. For example, for nil and t it returns 'null'
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index e80c42f523a..7d784ef3b1b 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -3183,6 +3183,13 @@ mule--ucs-names-group
(script (and char (aref char-script-table char))))
(if script (symbol-name script) "ungrouped"))))
+(defun char-to-name (char)
+ "Return the Unicode name for CHAR, if it has one, else nil.
+Return nil if CHAR is not a character."
+ (and (characterp char)
+ (or (get-char-code-property char 'name)
+ (get-char-code-property char 'old-name))))
+
(defun char-from-name (string &optional ignore-case)
"Return a character as a number from its Unicode name STRING.
If optional IGNORE-CASE is non-nil, ignore case in STRING.
--
2.39.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Use-char-to-name.patch --]
[-- Type: text/x-diff, Size: 2188 bytes --]
From 5ff4c3ac95d8dfcc172ad36f0ebd9c12443c9046 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Fri, 7 Jun 2024 12:07:50 +0200
Subject: [PATCH 2/3] Use 'char-to-name'
To: emacs-devel@gnu.org
* lisp/international/emoji.el (emoji--name): Lookup name using 'char-to-name'.
* lisp/international/textsec.el (textsec-domain-suspicious-p): And here.
* lisp/simple.el (what-cursor-position): And here.
---
lisp/international/emoji.el | 2 +-
lisp/international/textsec.el | 2 +-
lisp/simple.el | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el
index 4f3aab5a6be..cbf7c547f4c 100644
--- a/lisp/international/emoji.el
+++ b/lisp/international/emoji.el
@@ -245,7 +245,7 @@ emoji--fontify-glyph
(defun emoji--name (glyph)
(or (gethash glyph emoji--names)
- (get-char-code-property (aref glyph 0) 'name)))
+ (char-to-name (aref glyph 0))))
(defvar-keymap emoji-list-mode-map
"RET" #'emoji-list-select
diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el
index 4740dd81345..224363732fe 100644
--- a/lisp/international/textsec.el
+++ b/lisp/international/textsec.el
@@ -296,7 +296,7 @@ textsec-domain-suspicious-p
""
(concat ": " (string char)))
char
- (get-char-code-property char 'name)))))
+ (char-to-name char)))))
domain)
;; Does IDNA allow it?
(unless (puny-highly-restrictive-domain-p domain)
diff --git a/lisp/simple.el b/lisp/simple.el
index 68209eadc41..8d7e379b584 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1827,8 +1827,7 @@ what-cursor-position
(interactive "P")
(let* ((char (following-char))
(char-name (and what-cursor-show-names
- (or (get-char-code-property char 'name)
- (get-char-code-property char 'old-name))))
+ (char-to-name char)))
(char-name-fmt (if char-name
(format ", %s" char-name)
""))
--
2.39.2
[-- Attachment #4: 0003-Show-character-names-when-describing-translations.patch --]
[-- Type: text/x-diff, Size: 2772 bytes --]
From a2adb11e15a60ad30741c6cd8c47f03b5b1a902e Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Fri, 7 Jun 2024 12:21:11 +0200
Subject: [PATCH 3/3] Show character names when describing translations
To: emacs-devel@gnu.org
This implements Bug#71411.
* lisp/help.el (help-key-description): Use 'char-to-name' to show the
Unicode name of translated keys.
(help--describe-command): And here.
* etc/NEWS: Announce the change.
---
etc/NEWS | 14 ++++++++++++++
lisp/help.el | 9 +++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index c63e231f44f..66bc4d741ff 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -182,6 +182,20 @@ This user option controls outline visibility in the output buffer of
*** 'C-h m' ('describe-mode') uses outlining by default.
Set 'describe-mode-outline' to nil to get back the old behavior.
+*** 'C-h k' ('describe-key') shows Unicode name.
+For translated keys only, this will now show the Unicode name of the
+translation, e.g. 'C-h k C-x 8 E' will now show
+
+ € 'EURO SIGN' (translated from C-x 8 E)
+
+*** 'C-h b' ('describe-bindings') shows Unicode names.
+For translated keys only, Unicode names will now be shown, i.e.
+
+ A-! ¡ INVERTED EXCLAMATION MARK
+ A-$ ¤ CURRENCY SIGN
+
+and so on.
+
** Outline mode
*** New commands to show/hide outlines by regexp.
diff --git a/lisp/help.el b/lisp/help.el
index 2feb178ff6c..878dd404256 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -883,7 +883,9 @@ help-key-description
(let ((otherstring (help--key-description-fontified untranslated)))
(if (equal string otherstring)
string
- (format "%s (translated from %s)" string otherstring))))))
+ (if-let ((char-name (char-to-name (aref string 0))))
+ (format "%s '%s' (translated from %s)" string char-name otherstring)
+ (format "%s (translated from %s)" string otherstring)))))))
(defun help--binding-undefined-p (defn)
(or (null defn) (integerp defn) (equal defn #'undefined)))
@@ -1664,7 +1666,10 @@ help--shadow-lookup
(defun help--describe-command (definition &optional translation)
(cond ((or (stringp definition) (vectorp definition))
(if translation
- (insert (key-description definition nil) "\n")
+ (insert (concat (key-description definition nil)
+ (when-let ((char-name (char-to-name (aref definition 0))))
+ (format "\t%s" char-name))
+ "\n"))
;; These should be rare nowadays, replaced by `kmacro's.
(insert "Keyboard Macro\n")))
((keymapp definition)
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 12:16 ` Robert Pluim
@ 2024-06-07 13:42 ` Eli Zaretskii
2024-06-07 14:06 ` Robert Pluim
2024-06-07 14:01 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2024-06-07 13:42 UTC (permalink / raw)
To: Robert Pluim; +Cc: 71411
> From: Robert Pluim <rpluim@gmail.com>
> Cc: 71411@debbugs.gnu.org
> Date: Fri, 07 Jun 2024 14:16:38 +0200
>
> Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
> Eli> SMALL LETTER A? That'd be an annoyance, I think.
>
> Thatʼs not a translated binding, so no.
What is a "translated binding" or "translated key"? Without
explaining that, at least the NEWS entries are not clear enough.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 12:16 ` Robert Pluim
2024-06-07 13:42 ` Eli Zaretskii
@ 2024-06-07 14:01 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 14:25 ` Robert Pluim
1 sibling, 1 reply; 13+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-06-07 14:01 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 71411
On Fri, 07 Jun 2024 14:16:38 +0200 Robert Pluim <rpluim@gmail.com> wrote:
>>>>>> On Fri, 07 Jun 2024 14:08:33 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
> Eli> SMALL LETTER A? That'd be an annoyance, I think.
>
> Thatʼs not a translated binding, so no.
>
> Let me attach the patches.
[...]
> diff --git a/etc/NEWS b/etc/NEWS
> index c63e231f44f..66bc4d741ff 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -182,6 +182,20 @@ This user option controls outline visibility in the output buffer of
> *** 'C-h m' ('describe-mode') uses outlining by default.
> Set 'describe-mode-outline' to nil to get back the old behavior.
>
> +*** 'C-h k' ('describe-key') shows Unicode name.
> +For translated keys only, this will now show the Unicode name of the
> +translation, e.g. 'C-h k C-x 8 E' will now show
> +
> + € 'EURO SIGN' (translated from C-x 8 E)
How do you input 'C-h k C-x 8 E'? I can only input 'C-h k C-x 8 e'.
(Also with 'C-x 8' typing 'E' (i.e. 'S-e') inputs 'e').
Steve Berman
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 13:42 ` Eli Zaretskii
@ 2024-06-07 14:06 ` Robert Pluim
2024-06-08 13:24 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-06-07 14:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 71411
>>>>> On Fri, 07 Jun 2024 16:42:01 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: 71411@debbugs.gnu.org
>> Date: Fri, 07 Jun 2024 14:16:38 +0200
>>
Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
Eli> SMALL LETTER A? That'd be an annoyance, I think.
>>
>> Thatʼs not a translated binding, so no.
Eli> What is a "translated binding" or "translated key"? Without
Eli> explaining that, at least the NEWS entries are not clear enough.
Itʼs anything that goes through `key-translation-map'. How
about:
-- >8 --
*** 'C-h k' ('describe-key') shows Unicode name.
For keybindings which produce single characters via translation (such as
those using the 'C-x 8' prefix), 'C-h k' now shows the Unicode name of
the produced character in addition to the character itself, e.g.
'C-h k C-x 8 E' =>
€ 'EURO SIGN' (translated from C-x 8 E)
*** 'C-h b' ('describe-bindings') shows Unicode names.
For keybindings which produce single characters via translation, the
Unicode names will now be shown in addition to the character itself,
i.e.
A-! ¡ INVERTED EXCLAMATION MARK
A-$ ¤ CURRENCY SIGN
and so on.
-- >8 --
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 14:01 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-06-07 14:25 ` Robert Pluim
2024-06-07 14:29 ` Stephen Berman
0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-06-07 14:25 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 71411
>>>>> On Fri, 07 Jun 2024 16:01:41 +0200, Stephen Berman <stephen.berman@gmx.net> said:
Stephen> On Fri, 07 Jun 2024 14:16:38 +0200 Robert Pluim <rpluim@gmail.com> wrote:
>>>>>>> On Fri, 07 Jun 2024 14:08:33 +0300, Eli Zaretskii <eliz@gnu.org> said:
>>
Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
Eli> SMALL LETTER A? That'd be an annoyance, I think.
>>
>> Thatʼs not a translated binding, so no.
>>
>> Let me attach the patches.
Stephen> [...]
>> diff --git a/etc/NEWS b/etc/NEWS
>> index c63e231f44f..66bc4d741ff 100644
>> --- a/etc/NEWS
>> +++ b/etc/NEWS
>> @@ -182,6 +182,20 @@ This user option controls outline visibility in the output buffer of
>> *** 'C-h m' ('describe-mode') uses outlining by default.
>> Set 'describe-mode-outline' to nil to get back the old behavior.
>>
>> +*** 'C-h k' ('describe-key') shows Unicode name.
>> +For translated keys only, this will now show the Unicode name of the
>> +translation, e.g. 'C-h k C-x 8 E' will now show
>> +
>> + € 'EURO SIGN' (translated from C-x 8 E)
Stephen> How do you input 'C-h k C-x 8 E'? I can only input 'C-h k C-x 8 e'.
Stephen> (Also with 'C-x 8' typing 'E' (i.e. 'S-e') inputs 'e').
Itʼs a binding I added to master on Monday. You can use
'C-h k C-x 8 * E'
instead.
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 14:25 ` Robert Pluim
@ 2024-06-07 14:29 ` Stephen Berman
2024-06-07 14:31 ` Robert Pluim
0 siblings, 1 reply; 13+ messages in thread
From: Stephen Berman @ 2024-06-07 14:29 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 71411
On Fri, 07 Jun 2024 16:25:12 +0200 Robert Pluim <rpluim@gmail.com> wrote:
>>>>>> On Fri, 07 Jun 2024 16:01:41 +0200, Stephen Berman
> <stephen.berman@gmx.net> said:
>
> Stephen> On Fri, 07 Jun 2024 14:16:38 +0200 Robert Pluim
> Stephen> <rpluim@gmail.com> wrote:
> >>>>>>> On Fri, 07 Jun 2024 14:08:33 +0300, Eli Zaretskii <eliz@gnu.org> said:
> >>
> Eli> Does this mean that if I type "C-h k a" I will be told that a is LATIN
> Eli> SMALL LETTER A? That'd be an annoyance, I think.
> >>
> >> Thatʼs not a translated binding, so no.
> >>
> >> Let me attach the patches.
> Stephen> [...]
> >> diff --git a/etc/NEWS b/etc/NEWS
> >> index c63e231f44f..66bc4d741ff 100644
> >> --- a/etc/NEWS
> >> +++ b/etc/NEWS
> >> @@ -182,6 +182,20 @@ This user option controls outline visibility in
> >> the output buffer of
> >> *** 'C-h m' ('describe-mode') uses outlining by default.
> >> Set 'describe-mode-outline' to nil to get back the old behavior.
> >>
> >> +*** 'C-h k' ('describe-key') shows Unicode name.
> >> +For translated keys only, this will now show the Unicode name of the
> >> +translation, e.g. 'C-h k C-x 8 E' will now show
> >> +
> >> + € 'EURO SIGN' (translated from C-x 8 E)
>
> Stephen> How do you input 'C-h k C-x 8 E'? I can only input 'C-h k C-x 8 e'.
> Stephen> (Also with 'C-x 8' typing 'E' (i.e. 'S-e') inputs 'e').
>
> Itʼs a binding I added to master on Monday.
Ah, time to git pull again.
> You can use
>
> 'C-h k C-x 8 * E'
>
> instead.
Oh, right, I forgot about that. Thanks.
Steve Berman
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 14:29 ` Stephen Berman
@ 2024-06-07 14:31 ` Robert Pluim
0 siblings, 0 replies; 13+ messages in thread
From: Robert Pluim @ 2024-06-07 14:31 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 71411
>>>>> On Fri, 07 Jun 2024 16:29:38 +0200, Stephen Berman <stephen.berman@gmx.net> said:
>> You can use
>>
>> 'C-h k C-x 8 * E'
>>
>> instead.
Stephen> Oh, right, I forgot about that. Thanks.
Thatʼs why I added 'C-x 8 E' 😀
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-07 14:06 ` Robert Pluim
@ 2024-06-08 13:24 ` Eli Zaretskii
2024-06-10 9:03 ` Robert Pluim
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2024-06-08 13:24 UTC (permalink / raw)
To: Robert Pluim; +Cc: 71411
> From: Robert Pluim <rpluim@gmail.com>
> Cc: 71411@debbugs.gnu.org
> Date: Fri, 07 Jun 2024 16:06:22 +0200
>
> >>>>> On Fri, 07 Jun 2024 16:42:01 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> What is a "translated binding" or "translated key"? Without
> Eli> explaining that, at least the NEWS entries are not clear enough.
>
> Itʼs anything that goes through `key-translation-map'. How
> about:
>
> -- >8 --
> *** 'C-h k' ('describe-key') shows Unicode name.
> For keybindings which produce single characters via translation (such as
> those using the 'C-x 8' prefix), 'C-h k' now shows the Unicode name of
> the produced character in addition to the character itself, e.g.
Are there any other cases of "translated characters", besides "C-x 8"?
If so, please mention one or two more. If there are no other
examples, I'd remove "such as".
Otherwise, LGTM; please install.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-08 13:24 ` Eli Zaretskii
@ 2024-06-10 9:03 ` Robert Pluim
2024-06-10 12:34 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-06-10 9:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 71411
>>>>> On Sat, 08 Jun 2024 16:24:08 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> *** 'C-h k' ('describe-key') shows Unicode name.
>> For keybindings which produce single characters via translation (such as
>> those using the 'C-x 8' prefix), 'C-h k' now shows the Unicode name of
>> the produced character in addition to the character itself, e.g.
Eli> Are there any other cases of "translated characters", besides "C-x 8"?
Eli> If so, please mention one or two more. If there are no other
Eli> examples, I'd remove "such as".
iso-transl.el is (almost) the only thing that uses
`key-translation-map' (the other is 'double.el', but thatʼs really
niche). I can mention the other prefixes.
-- >8 --
*** 'C-h k' ('describe-key') shows Unicode name.
For keybindings which produce single characters via translation (such as
those using the 'C-x 8' or 'A-' prefix, or 'dead-acute', 'dead-grave',
etc), 'C-h k' now shows the Unicode name of the produced character in
addition to the character itself, e.g.
'C-h k C-x 8 E' =>
€ 'EURO SIGN' (translated from C-x 8 E)
*** 'C-h b' ('describe-bindings') shows Unicode names.
For keybindings which produce single characters via translation, the
Unicode names will now be shown in addition to the character itself,
i.e.
A-! ¡ INVERTED EXCLAMATION MARK
A-$ ¤ CURRENCY SIGN
and so on.
-- >8 --
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-10 9:03 ` Robert Pluim
@ 2024-06-10 12:34 ` Eli Zaretskii
2024-06-10 13:01 ` Robert Pluim
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2024-06-10 12:34 UTC (permalink / raw)
To: Robert Pluim; +Cc: 71411
> From: Robert Pluim <rpluim@gmail.com>
> Cc: 71411@debbugs.gnu.org
> Date: Mon, 10 Jun 2024 11:03:07 +0200
>
> >>>>> On Sat, 08 Jun 2024 16:24:08 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> Are there any other cases of "translated characters", besides "C-x 8"?
> Eli> If so, please mention one or two more. If there are no other
> Eli> examples, I'd remove "such as".
>
> iso-transl.el is (almost) the only thing that uses
> `key-translation-map' (the other is 'double.el', but thatʼs really
> niche). I can mention the other prefixes.
>
> -- >8 --
> *** 'C-h k' ('describe-key') shows Unicode name.
> For keybindings which produce single characters via translation (such as
> those using the 'C-x 8' or 'A-' prefix, or 'dead-acute', 'dead-grave',
> etc), 'C-h k' now shows the Unicode name of the produced character in
> addition to the character itself, e.g.
>
> 'C-h k C-x 8 E' =>
>
> € 'EURO SIGN' (translated from C-x 8 E)
>
> *** 'C-h b' ('describe-bindings') shows Unicode names.
> For keybindings which produce single characters via translation, the
> Unicode names will now be shown in addition to the character itself,
> i.e.
>
> A-! ¡ INVERTED EXCLAMATION MARK
> A-$ ¤ CURRENCY SIGN
>
> and so on.
What about characters produced by input methods? For example:
C-u C-\ cyrillic-translit RET
C-h k z h =>
ж (translated from h ж) runs the command self-insert-command
(which, btw, uncovers a bug, since "h ж" is bogus and should be "z h"
instead).
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#71411: 30.0.50; Show Unicode names when describing translations
2024-06-10 12:34 ` Eli Zaretskii
@ 2024-06-10 13:01 ` Robert Pluim
0 siblings, 0 replies; 13+ messages in thread
From: Robert Pluim @ 2024-06-10 13:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 71411
>>>>> On Mon, 10 Jun 2024 15:34:35 +0300, Eli Zaretskii <eliz@gnu.org> said:
Eli> What about characters produced by input methods? For example:
Eli> C-u C-\ cyrillic-translit RET
Eli> C-h k z h =>
Eli> ж (translated from h ж) runs the command self-insert-command
I completely forgot to check input methods, it works there as well:
ж 'CYRILLIC SMALL LETTER ZHE' (translated from h ж) runs the command
self-insert-command (found in global-map), which is an interactive
primitive-function in ‘C source code’.
Iʼll put that in the NEWS entry.
Eli> (which, btw, uncovers a bug, since "h ж" is bogus and should be "z h"
Eli> instead).
Right, but thatʼs a separate issue.
Robert
--
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-06-10 13:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-07 10:32 bug#71411: 30.0.50; Show Unicode names when describing translations Robert Pluim
2024-06-07 11:08 ` Eli Zaretskii
2024-06-07 12:16 ` Robert Pluim
2024-06-07 13:42 ` Eli Zaretskii
2024-06-07 14:06 ` Robert Pluim
2024-06-08 13:24 ` Eli Zaretskii
2024-06-10 9:03 ` Robert Pluim
2024-06-10 12:34 ` Eli Zaretskii
2024-06-10 13:01 ` Robert Pluim
2024-06-07 14:01 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 14:25 ` Robert Pluim
2024-06-07 14:29 ` Stephen Berman
2024-06-07 14:31 ` Robert Pluim
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.