From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#20522: 25.0.50; =?UTF-8?Q?=E2=80=98C-u?= C-x =?UTF-8?Q?=3D=E2=80=99?= output, =?UTF-8?Q?=E2=80=98to_?= =?UTF-8?Q?input=E2=80=99?= field Date: Thu, 07 May 2015 15:15:32 +0000 Message-ID: <874mnoju5n.fsf_-_@violet.siamics.net> References: <988c8ea5-e184-4d53-99d6-cd354006f45b@default> <87h9rokgm8.fsf@violet.siamics.net> <838ud0qwe9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1431011789 30431 80.91.229.3 (7 May 2015 15:16:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 15:16:29 +0000 (UTC) To: 20522@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 07 17:16:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqNX6-0005hz-3G for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 May 2015 17:16:16 +0200 Original-Received: from localhost ([::1]:51711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqNX5-0001xd-G2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 May 2015 11:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqNWy-0001wp-5Z for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 11:16:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqNWt-0006ir-SY for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 11:16:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqNWs-0006ig-Vg for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 11:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YqNWs-0005x5-FS for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 May 2015 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20522-submit@debbugs.gnu.org id=B20522.143101175422859 (code B ref 20522); Thu, 07 May 2015 15:16:02 +0000 Original-Received: (at 20522) by debbugs.gnu.org; 7 May 2015 15:15:54 +0000 Original-Received: from localhost ([127.0.0.1]:37941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqNWj-0005wb-HH for submit@debbugs.gnu.org; Thu, 07 May 2015 11:15:54 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:42112) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqNWg-0005wP-Kz for 20522@debbugs.gnu.org; Thu, 07 May 2015 11:15:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=CagBkylFSgqt31YfU//Ne0sCQ9PKE2BXJMKnQpsFKa4=; b=Byq1oN9Qa0nfqmxXtW0vSCBdrdgsQnyltDQiTFkpByiGUYIA8Ncd0+84ZIe3A57VD6zGBdjvT4xSY8tFKm79K0vFEDypnYFRSs387jVqyQFeqNyfdbPUvX4ZzUoglYIJmw4BEJl4qHi4m5AmBxlnTaZHll0lrh9zaXOIs66IzuU=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YqNWf-0001HY-G2 for 20522@debbugs.gnu.org; Thu, 07 May 2015 15:15:49 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YqNWW-0001cX-H1 for 20522@debbugs.gnu.org; Thu, 07 May 2015 22:15:41 +0700 Mail-Followup-To: 20522@debbugs.gnu.org In-Reply-To: <838ud0qwe9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 May 2015 17:45:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102571 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Eli Zaretskii 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=E2=80=99ve suspected something like that, but didn=E2=80=99t 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. --=20 FSF associate member #7257 http://am-1.org/~ivan/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- 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 --=-=-=--