From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#32562: 26; `read-char(-exclusive)' and `characterp' Date: Tue, 28 Aug 2018 13:39:20 -0700 (PDT) Message-ID: <3cce8b54-2e85-49a2-84d8-386ded864148@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1535488692 12799 195.159.176.226 (28 Aug 2018 20:38:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 20:38:12 +0000 (UTC) To: 32562@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 28 22:38:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fukkX-0003BD-IP for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 22:38:05 +0200 Original-Received: from localhost ([::1]:39956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fukmd-0003Q3-Sn for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 16:40:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fukmT-0003PV-SX for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:40:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fukmQ-0003EA-Ml for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:40:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fukmQ-0003E6-IJ for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fukmQ-0001ni-F6 for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Aug 2018 20:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32562 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15354887766881 (code B ref -1); Tue, 28 Aug 2018 20:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Aug 2018 20:39:36 +0000 Original-Received: from localhost ([127.0.0.1]:36020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fukm0-0001mv-43 for submit@debbugs.gnu.org; Tue, 28 Aug 2018 16:39:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fukly-0001mi-B3 for submit@debbugs.gnu.org; Tue, 28 Aug 2018 16:39:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fukls-0002yB-DV for submit@debbugs.gnu.org; Tue, 28 Aug 2018 16:39:29 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38680) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fukls-0002y7-93 for submit@debbugs.gnu.org; Tue, 28 Aug 2018 16:39:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuklr-0002vC-BY for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:39:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuklo-0002vm-4t for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:39:27 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:34522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fukln-0002v0-P9 for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:39:24 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7SKd069188380 for ; Tue, 28 Aug 2018 20:39:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=pjPSTYOv6bXaQaKQEZxgF6vZqyObxxXkr5FWePoqukk=; b=UFgxa0YB8+OvMgcdRn/9V57NQ1zAL1hS0aedL3g7efWKDQwj+hYBq07pkaq5brNhEIo0 HFuLGx/ShzbvEMp+2e4i3Mw4+jb28VN9xeHiEvUbWgHMmKl/6a8d2ef7iI0n0Se2Q+h3 yFAAHrIhjBNU+m1tHx4I9qaUU5OHKt2wkn3fSMsFdy//UzU55rcIDq7eELB710SR+MiP aahh+fRUkcD8fv82ihOU0rbw8S/LHKbRpG4TZy7yDWAm3LyOXtqWteyxVgzu8vuO6IPP zjvkFxRCIsjibmw5WGMAu7ICeoIqr+23Hg7bN+I4BKit6vBfXDIT83tYUsblAfc4ykRB Sg== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2m2y2pe81u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 28 Aug 2018 20:39:22 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7SKdLfS018669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 28 Aug 2018 20:39:21 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w7SKdL6b017757 for ; Tue, 28 Aug 2018 20:39:21 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4732.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8999 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808280200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:149810 Archived-At: Perhaps there is no bug here, other than incomplete or insufficiently clear doc. Dunno. emacs -Q M-: (setq foo (read-char "Char: ")) M-: shows: 134217786 (#o1000000072, #x800003a), a number too large to be `characterp'. And M-: (characterp foo) ; returns nil. Same thing for `read-char-exclusive'. Something seems wrong. The doc for `read-char(-exclusive)' talks about reading a character. For `read-char' it says that it raises an error for a non-char event. And for `read-char-exclusive' it says that it ignores non-char events that it reads. But they both seem to read the event from `M-:' and return its value (a number). And it is not a character, according to `characterp'. I'm confused. Please consider fixing this, at least by clarifying the doc. Why should a function that reads a character, and either ignores a non-char or raises an error for a non-char, return a non-character? And what function reads a `characterp' character, either ignoring anything else or raising an error for anything else? In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor `Microsoft Corp.', version 10.0.16299 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''