* bug#20522: 25.0.50; `C-u C-x =' output, `to input' field
@ 2015-05-07 0:03 Drew Adams
2015-05-07 7:10 ` bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2015-05-07 0:03 UTC (permalink / raw)
To: 20522
C-u C-x 8 RET GREEK CAPITAL LETTER PSI RET
C-b
C-u C-x =
Buffer *Help* says this, for field `to input':
type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
It should instead be able to say something like this:
type "C-x 8 RET 0x03A8" or "C-x 8 RET GREEK CAPITAL LETTER PSI"
Both of these pieces of information are shown in the same buffer
*Help*. It seems a bit silly to tell a user to type HEX-CODEPOINT or
NAME, when these are known when *Help* is created.
In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 0:03 bug#20522: 25.0.50; `C-u C-x =' output, `to input' field Drew Adams
@ 2015-05-07 7:10 ` Ivan Shmakov
2015-05-07 14:45 ` Eli Zaretskii
2015-05-07 15:55 ` Drew Adams
0 siblings, 2 replies; 7+ messages in thread
From: Ivan Shmakov @ 2015-05-07 7:10 UTC (permalink / raw)
To: 20522, control
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
tag 20522 + patch
tag 20519 + patch
thanks
>>>>> Drew Adams <drew.adams@oracle.com> writes:
> C-u C-x 8 RET GREEK CAPITAL LETTER PSI RET C-b C-u C-x =
> Buffer *Help* says this, for field `to input':
> type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
> It should instead be able to say something like this:
> type "C-x 8 RET 0x03A8" or "C-x 8 RET GREEK CAPITAL LETTER PSI"
> Both of these pieces of information are shown in the same buffer
> *Help*. It seems a bit silly to tell a user to type HEX-CODEPOINT or
> NAME, when these are known when *Help* is created.
Please consider the patch MIMEd.
* lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
invocation instead of a template. (Bug#20522)
[…]
--
FSF associate member #7257 np. Danger Zone — Rainbow … 3013 B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 583 bytes --]
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -618,7 +618,9 @@ defun describe-char (pos &optional buffer)
'help-args '(,current-input-method))
"input method")
(list
- "type \"C-x 8 RET HEX-CODEPOINT\" or \"C-x 8 RET NAME\"")))))
+ (format
+ "type \"C-x 8 RET %04x\" or \"C-x 8 RET %s\""
+ char (get-char-code-property char 'name)))))))
("buffer code"
,(if multibyte-p
(encoded-string-description
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 7:10 ` bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field Ivan Shmakov
@ 2015-05-07 14:45 ` Eli Zaretskii
2015-05-07 15:15 ` Ivan Shmakov
2015-05-07 15:55 ` Drew Adams
1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2015-05-07 14:45 UTC (permalink / raw)
To: Ivan Shmakov; +Cc: 20522
> From: Ivan Shmakov <ivan@siamics.net>
> Date: Thu, 07 May 2015 07:10:23 +0000
>
> --- a/lisp/descr-text.el
> +++ b/lisp/descr-text.el
> @@ -618,7 +618,9 @@ defun describe-char (pos &optional buffer)
> 'help-args '(,current-input-method))
> "input method")
> (list
> - "type \"C-x 8 RET HEX-CODEPOINT\" or \"C-x 8 RET
> NAME\"")))))
> + (format
> + "type \"C-x 8 RET %04x\" or \"C-x 8 RET %s\""
^^^^
I see no need to tell users to type at least 4 hex digits: "C-x 8 RET"
accepts even one digit. So I think we should use %x here.
> + char (get-char-code-property char 'name)))))))
Not every Unicode codepoint has a name, so get-char-code-property
could return nil. E.g., try with any codepoint between zero and #x1f,
inclusive. When that happens, we should try 'old-name' instead, and
if that returns nil as well (try #x99, for example), I think the "by
name" part should be omitted from the output of describe-char.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 14:45 ` Eli Zaretskii
@ 2015-05-07 15:15 ` Ivan Shmakov
2015-05-07 15:37 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2015-05-07 15:15 UTC (permalink / raw)
To: 20522
[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> From: Ivan Shmakov Date: Thu, 07 May 2015 07:10:23 +0000
>> + (format
>> + "type \"C-x 8 RET %04x\" or \"C-x 8 RET %s\""
> ^^^^ I see no need to tell users to type at
> least 4 hex digits: "C-x 8 RET" accepts even one digit. So I think
> we should use %x here.
>> + char (get-char-code-property char 'name)))))))
> Not every Unicode codepoint has a name, so get-char-code-property
> could return nil. E. g., try with any codepoint between zero and
> #x1f, inclusive. When that happens, we should try 'old-name'
> instead, and if that returns nil as well (try #x99, for example), I
> think the "by name" part should be omitted from the output of
> describe-char.
(I’ve suspected something like that, but didn’t check.)
Please consider the revised patch MIMEd.
* lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
invocation instead of a template. (Bug#20522)
It was also requested in bug#20499 that a specific C-x 8
(iso-transl) sequence is shown. Yet I believe that deserves a
separate patch.
--
FSF associate member #7257 http://am-1.org/~ivan/ … 3013 B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 872 bytes --]
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -618,7 +618,14 @@ defun describe-char (pos &optional buffer)
'help-args '(,current-input-method))
"input method")
(list
- "type \"C-x 8 RET HEX-CODEPOINT\" or \"C-x 8 RET NAME\"")))))
+ (let ((name
+ (or (get-char-code-property char 'name)
+ (get-char-code-property char 'old-name))))
+ (if name
+ (format
+ "type \"C-x 8 RET %x\" or \"C-x 8 RET %s\""
+ char name)
+ (format "type \"C-x 8 RET %x\"" char))))))))
("buffer code"
,(if multibyte-p
(encoded-string-description
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 15:15 ` Ivan Shmakov
@ 2015-05-07 15:37 ` Eli Zaretskii
2015-05-27 22:30 ` Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2015-05-07 15:37 UTC (permalink / raw)
To: Ivan Shmakov; +Cc: 20522
> From: Ivan Shmakov <ivan@siamics.net>
> Date: Thu, 07 May 2015 15:15:32 +0000
>
> Please consider the revised patch MIMEd.
>
> * lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
> invocation instead of a template. (Bug#20522)
>
> It was also requested in bug#20499 that a specific C-x 8
> (iso-transl) sequence is shown. Yet I believe that deserves a
> separate patch.
>
> --
> FSF associate member #7257 http://am-1.org/~ivan/ … 3013 B6A0 230E 334A
>
> [2:text/diff Hide]
>
> --- a/lisp/descr-text.el
> +++ b/lisp/descr-text.el
> @@ -618,7 +618,14 @@ defun describe-char (pos &optional buffer)
> 'help-args '(,current-input-method))
> "input method")
> (list
> - "type \"C-x 8 RET HEX-CODEPOINT\" or \"C-x 8 RET NAME\"")))))
> + (let ((name
> + (or (get-char-code-property char 'name)
> + (get-char-code-property char 'old-name))))
> + (if name
> + (format
> + "type \"C-x 8 RET %x\" or \"C-x 8 RET %s\""
> + char name)
> + (format "type \"C-x 8 RET %x\"" char))))))))
> ("buffer code"
> ,(if multibyte-p
> (encoded-string-description
LGTM, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 7:10 ` bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field Ivan Shmakov
2015-05-07 14:45 ` Eli Zaretskii
@ 2015-05-07 15:55 ` Drew Adams
1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2015-05-07 15:55 UTC (permalink / raw)
To: Ivan Shmakov, 20522, control
> > C-u C-x 8 RET GREEK CAPITAL LETTER PSI RET C-b C-u C-x =
> > Buffer *Help* says this, for field `to input':
> > type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
> > It should instead be able to say something like this:
> > type "C-x 8 RET 0x03A8" or "C-x 8 RET GREEK CAPITAL LETTER PSI"
>
> > Both of these pieces of information are shown in the same buffer
> > *Help*. It seems a bit silly to tell a user to type HEX-
> > CODEPOINT or NAME, when these are known when *Help* is created.
>
> Please consider the patch MIMEd.
> * lisp/descr-text.el (describe-char): Show the exact C-x 8
> RET invocation instead of a template. (Bug#20522)
Looks good; thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field
2015-05-07 15:37 ` Eli Zaretskii
@ 2015-05-27 22:30 ` Ivan Shmakov
0 siblings, 0 replies; 7+ messages in thread
From: Ivan Shmakov @ 2015-05-27 22:30 UTC (permalink / raw)
To: 20522-done
Version: 25.1
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> From: Ivan Shmakov Date: Thu, 07 May 2015 15:15:32 +0000
>> Please consider the revised patch MIMEd.
>> * lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
>> invocation instead of a template. (Bug#20522)
[…]
> LGTM, thanks.
Pushed, closing.
commit 21b81bd8c51cf48e08089087a17f66eb70625748
Date: 2015-05-27 22:14:57 +0000
Show the exact C-x 8 RET invocation in describe-char.
* lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
invocation instead of a template. (Bug#20522)
--
FSF associate member #7257 http://am-1.org/~ivan/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-27 22:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 0:03 bug#20522: 25.0.50; `C-u C-x =' output, `to input' field Drew Adams
2015-05-07 7:10 ` bug#20522: 25.0.50; ‘C-u C-x =’ output, ‘to input’ field Ivan Shmakov
2015-05-07 14:45 ` Eli Zaretskii
2015-05-07 15:15 ` Ivan Shmakov
2015-05-07 15:37 ` Eli Zaretskii
2015-05-27 22:30 ` Ivan Shmakov
2015-05-07 15:55 ` Drew Adams
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).