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 14:24:36 -0700 (PDT) Message-ID: <563c0c84-c4dd-4672-a009-df90bef6d6a3@default> References: <3cce8b54-2e85-49a2-84d8-386ded864148@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1535491516 18686 195.159.176.226 (28 Aug 2018 21:25:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 21:25:16 +0000 (UTC) Cc: 32562@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 28 23:25:11 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 1fulU4-0004gZ-NZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 23:25:08 +0200 Original-Received: from localhost ([::1]:40099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fulWA-0007Ux-RI for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 17:27:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fulUF-00064w-To for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 17:25:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fulU8-0004Xi-GG for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 17:25:19 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fulTy-0004Hq-SM for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 17:25:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fulTy-0004ux-Mo for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 17:25: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 21:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32562 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32562-submit@debbugs.gnu.org id=B32562.153549148618867 (code B ref 32562); Tue, 28 Aug 2018 21:25:02 +0000 Original-Received: (at 32562) by debbugs.gnu.org; 28 Aug 2018 21:24:46 +0000 Original-Received: from localhost ([127.0.0.1]:36056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fulTi-0004uF-Ai for submit@debbugs.gnu.org; Tue, 28 Aug 2018 17:24:46 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:47508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fulTg-0004u2-GL for 32562@debbugs.gnu.org; Tue, 28 Aug 2018 17:24:44 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7SLO2AO196405; Tue, 28 Aug 2018 21:24:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=HdQ0AvOYGaUfJzISMwKIxvxqYrG4zX+ma5PZxERlg08=; b=P/uhp6Hioy/2lHVdVfOyDxKvSTa2p/VDjbED6OGnoABfxJ7bHOLtOtMXXTlGHEXpX8V0 SFuegv05yjsXBCIpSrl7WzFCvd8W1qO2B4XeX+sm4VPcgWZJtGrofM5m71VLLMSVezs8 i6FramfBTn1pfODRiW6o7O6Z/fsj9UtvpebzM2WZFWj24GwgEm8UOG5sSXY3sMO6wO+T ycsHbbOSs+cHDzx8tGwu8qFO2wMvBft8DMba2V3/Wo6UtirsUNKI3irm7P09emEc1hSe y+QGcisXkOP1gS2nADZ0d7QtcpWZ19OqhU5xxA6OnKC/f1D6/LGXEj+IT/T6kvBY3WA9 TA== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2m2xhtpf4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Aug 2018 21:24:38 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7SLObVO002958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Aug 2018 21:24:37 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w7SLObD5015197; Tue, 28 Aug 2018 21:24:37 GMT In-Reply-To: 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=0 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-1808280207 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:149813 Archived-At: > forcemerge 13599 32562 > quit >=20 > > Something seems wrong. The doc for `read-char(-exclusive)' talks about > > reading a character. For `read-char' it says that it raises an error fo= r > > a non-char event. And for `read-char-exclusive' it says that it ignore= s > > 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'. >=20 > This is bug#13599/1042 Hm. Maybe it is. But is `read-char' necessarily about chars that satisfy `c= haracterp'? I would think so, but maybe not. And there are other "character" functions,= which accept chars as args - `text-char-description', for example. (That's= what I was passing the result of `read-char' to.)=20 The doc string of `text-char-description' says "file-character CHARACTER". = What's a "file character"? A character that can appear in a file name? Same= thing as what `max-char' should recognize? Same thing as what `read-char' = should consider a char? The Elisp manual (node Describing Characters) says = it is "characters that appear in text=E2=80=94like =E2=80=98single-key-desc= ription=E2=80=99, except that..." It says nothing about "file characters". = The doc is not too clear. This stuff is not clear more generally, I think - beyond the max value of `= max-char'. Do we have or want to have different kinds of "characters" retur= ned from or passed as args to different "character" functions? Why (or why = not)? Wrt my original problem: taking a value of `M-:' from `read-char' and passi= ng it to `text-char-description', Emacs has a regression of sorts. Older Em= acs versions "work", whereas recent versions raise an error. E.g. Emacs 20 = `read-char' returns -134217670, and passing that to `text-char-description'= gives "\272". Whatever `read-char' can read, it seems, `text-char-descript= ion' can describe (perhaps imperfectly?). I think that "the bug" is not so clear cut as just adjusting `max-char'. I = think the behavior of several functions that expect or return chars might d= eserve adjustment, and the doc might deserve some clarification/fixes. We m= ight need to decide what the right behaviors are first.