From: Drew Adams <drew.adams@oracle.com>
To: 32562@debbugs.gnu.org
Subject: bug#32562: 26; `read-char(-exclusive)' and `characterp'
Date: Tue, 28 Aug 2018 13:39:20 -0700 (PDT) [thread overview]
Message-ID: <3cce8b54-2e85-49a2-84d8-386ded864148@default> (raw)
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=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
next reply other threads:[~2018-08-28 20:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 20:39 Drew Adams [this message]
2018-08-28 20:51 ` bug#32562: 26; `read-char(-exclusive)' and `characterp' Noam Postavsky
2018-08-28 21:24 ` Drew Adams
2018-08-28 22:27 ` Noam Postavsky
2018-09-10 10:01 ` Eli Zaretskii
2018-09-10 9:56 ` Eli Zaretskii
[not found] <<3cce8b54-2e85-49a2-84d8-386ded864148@default>
[not found] ` <<83d0tlpteu.fsf@gnu.org>
2018-09-10 13:43 ` Drew Adams
2018-09-10 14:04 ` Eli Zaretskii
2018-09-10 14:29 ` Andreas Schwab
2018-09-10 15:01 ` Drew Adams
2018-09-10 17:22 ` Eli Zaretskii
[not found] <<<3cce8b54-2e85-49a2-84d8-386ded864148@default>
[not found] ` <<<83d0tlpteu.fsf@gnu.org>
[not found] ` <<5f51bd06-84dd-47f5-a7da-b0c5814a274c@default>
[not found] ` <<83r2i1o3dr.fsf@gnu.org>
2018-09-10 14:57 ` Drew Adams
[not found] ` <<mvmtvmxctnm.fsf@suse.de>
[not found] ` <<3d6fb22f-de5a-4cce-bf49-023f2fc8388f@default>
[not found] ` <<83k1ntnu6l.fsf@gnu.org>
2018-09-10 19:48 ` Drew Adams
2018-09-11 7:57 ` Eli Zaretskii
2018-09-11 15:30 ` Drew Adams
2018-09-11 17:07 ` Eli Zaretskii
[not found] ` <<<5f51bd06-84dd-47f5-a7da-b0c5814a274c@default>
[not found] ` <<<mvmtvmxctnm.fsf@suse.de>
[not found] ` <<<3d6fb22f-de5a-4cce-bf49-023f2fc8388f@default>
[not found] ` <<<83k1ntnu6l.fsf@gnu.org>
[not found] ` <<4df2c3ce-9dcb-483c-b733-f91f54f33bce@default>
[not found] ` <<831sa0o49d.fsf@gnu.org>
[not found] ` <<4d4aa5cd-964c-41c5-ae72-24769afb0bd0@default>
[not found] ` <<83in3cm08g.fsf@gnu.org>
2018-09-11 17:22 ` Drew Adams
2018-09-11 18:34 ` Eli Zaretskii
[not found] <<<<3cce8b54-2e85-49a2-84d8-386ded864148@default>
[not found] ` <<<<83d0tlpteu.fsf@gnu.org>
[not found] ` <<<<5f51bd06-84dd-47f5-a7da-b0c5814a274c@default>
[not found] ` <<<<mvmtvmxctnm.fsf@suse.de>
[not found] ` <<<<3d6fb22f-de5a-4cce-bf49-023f2fc8388f@default>
[not found] ` <<<<83k1ntnu6l.fsf@gnu.org>
[not found] ` <<<4df2c3ce-9dcb-483c-b733-f91f54f33bce@default>
[not found] ` <<<831sa0o49d.fsf@gnu.org>
[not found] ` <<<4d4aa5cd-964c-41c5-ae72-24769afb0bd0@default>
[not found] ` <<<83in3cm08g.fsf@gnu.org>
[not found] ` <<eedf9125-6ece-44cb-a01b-b8da3d707e8c@default>
[not found] ` <<83ftyfnarp.fsf@gnu.org>
2018-09-11 18:58 ` Drew Adams
2018-09-11 19:03 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3cce8b54-2e85-49a2-84d8-386ded864148@default \
--to=drew.adams@oracle.com \
--cc=32562@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.