From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#13177: 24.3.50; doc of `read-char-by-name' Date: Thu, 13 Dec 2012 20:01:47 -0800 Message-ID: <4AF22BD1F38E4AF2A650D1F537B47069@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355457731 641 80.91.229.3 (14 Dec 2012 04:02:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 04:02:11 +0000 (UTC) To: 13177@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 14 05:02:25 2012 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 1TjMTg-0008I4-9Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2012 05:02:24 +0100 Original-Received: from localhost ([::1]:46781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTT-00015G-Dh for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Dec 2012 23:02:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTQ-00015B-63 for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:02:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjMTO-0004TZ-S7 for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:02:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTO-0004TV-P1 for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:02:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TjMUI-0001tX-1z for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Dec 2012 04:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13177 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.13554577767262 (code B ref -1); Fri, 14 Dec 2012 04:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Dec 2012 04:02:56 +0000 Original-Received: from localhost ([127.0.0.1]:41627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjMUC-0001t4-2P for submit@debbugs.gnu.org; Thu, 13 Dec 2012 23:02:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33239) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjMU9-0001sx-Sf for submit@debbugs.gnu.org; Thu, 13 Dec 2012 23:02:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjMTE-0004Sh-Mr for submit@debbugs.gnu.org; Thu, 13 Dec 2012 23:01:58 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:56357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTE-0004Sd-Ja for submit@debbugs.gnu.org; Thu, 13 Dec 2012 23:01:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTC-00014A-Lg for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:01:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjMTB-0004S6-ET for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:01:54 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:49415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjMTB-0004Rs-7h for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 23:01:53 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qBE41p83009847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Dec 2012 04:01:52 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qBE41oks015984 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 14 Dec 2012 04:01:51 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qBE41oMt000381 for ; Thu, 13 Dec 2012 22:01:50 -0600 Original-Received: from dradamslap1 (/10.159.136.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 13 Dec 2012 20:01:50 -0800 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac3Zr7y28FL2PGEfQcuVsSNdtgQMqg== X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:68491 Archived-At: Emacs-Lisp `read*' functions generally return what they say they read. This function does not necessarily return a character, which is what its doc says it does. It can return nil. The doc needs to mention this behavior, especially as it is pretty exceptional. There's nothing wrong with such behavior, but I wonder a bit whether this function shouldn't perhaps use `completing-read' with a non-nil REQUIRE-MATCH argument. IOW, perhaps it should ignore names that are unknown. In that case it would always do what the doc currently says it does: return a character (by name). At least it's another possibility. Dunno just what the intention was for this function. If it really was to return a recognized Unicode character then this is a product bug and reading should not end until the user enters matching input (or hits `C-g'). If the intention was really to do what the function does now, then this is a doc bug: mention a possible nil return value and what it means. Alternatively, we might add another function, say `read-char-by-name-exclusive', that always returns a named char. That would be somewhat analogous to how `read-char-exclusive' ignores non-chars, while `read-char' signals an error for them. (Note though that neither of those functions simply accepts and returns a non-char event.) Anyway, for this bug report and for my part, it would be enough to correct the doc to say that if the user enters a name that is unknown then nil is returned. In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600) of 2012-12-13 on ODIEONE Bzr revision: 111211 eggert@cs.ucla.edu-20121213021749-eyqqen0ewhn2hogq Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -IC:/Devel/emacs/build/include -Wall -Wextra -Wno-sign-compare -Wno-type-limits -Wno-missing-field-initializers -Wno-pointer-sign -Wdeclaration-after-statement --ldflags -LC:/Devel/emacs/build/lib'