From: Markus Triska <markus.triska@gmx.at>
To: martin rudalics <rudalics@gmx.at>
Cc: 1042@emacsbugs.donarmstrong.com
Subject: bug#1042: 23.0.60; read-char can evaluate to non-character
Date: Sun, 28 Sep 2008 14:14:55 +0200 [thread overview]
Message-ID: <m1tzc08o1s.fsf@gmx.at> (raw)
In-Reply-To: <48DF4544.2070704@gmx.at> (martin rudalics's message of "Sun, 28 Sep 2008 10:50:12 +0200")
martin rudalics <rudalics@gmx.at> writes:
> The doc-string of `read-char' says
C-SPC (= 0) is different from C-0: (characterp 0) is t, and
(char-to-string 0) evaluates to a string; i.e., it is a character.
> Do you have a particular use case that calls for throwing an error
> here?
I relied on `read-char' evaluating to a character in ediprolog:
http://www.logic.at/prolog/ediprolog/ediprolog.html
On l.352, I read a character from the user and use `char-to-string' to
send it to the Prolog process as string. If the user generates an event
that is not a character, it should not be sent to the Prolog process,
and a usage note is displayed instead.
Thus, I can work around the current behaviour of `read-char' by also
guarding `char-to-string' against errors, or using the now obsolete
`char-valid-p' for Emacs 22, and `characterp' for later versions.
However, it would be nice if `read-char' always yielded a character.
next prev parent reply other threads:[~2008-09-28 12:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-28 5:09 bug#1042: 23.0.60; read-char can evaluate to non-character Markus Triska
2008-09-28 8:50 ` martin rudalics
2008-09-28 12:14 ` Markus Triska [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-29 22:38 Chong Yidong
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=m1tzc08o1s.fsf@gmx.at \
--to=markus.triska@gmx.at \
--cc=1042@emacsbugs.donarmstrong.com \
--cc=rudalics@gmx.at \
/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.