[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32562: 26; `read-char(-exclusive)' and `characterp'
From: |
Eli Zaretskii |
Subject: |
bug#32562: 26; `read-char(-exclusive)' and `characterp' |
Date: |
Mon, 10 Sep 2018 13:01:11 +0300 |
> Date: Tue, 28 Aug 2018 14:24:36 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 32562@debbugs.gnu.org
>
> is `read-char' necessarily about chars that satisfy `characterp'?
No. It returns a character event, not a character.
> 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?
No, text-char-description accepts only valid character codes, those
which satisfy the 'characterp' test. This is unlike
single-key-description, which accepts _events_, and thus will happily
process character input events that are not valid character codes,
i.e. fail the 'characterp' test. I've now made that clear in the
respective doc strings.
> 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"
> returned from or passed as args to different "character" functions? Why (or
> why not)?
The basic difference is between a character code and a character input
event.
> Wrt my original problem: taking a value of `M-:' from `read-char' and passing
> it to `text-char-description', Emacs has a regression of sorts. Older Emacs
> 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-description' can describe (perhaps imperfectly?).
It's not a regression: text-char-description wants a valid character
code.
I'm closing this bug, as I think this is a documentation issue which
is now fixed.
Thanks.
- bug#32562: 26; `read-char(-exclusive)' and `characterp',
Eli Zaretskii <=
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Eli Zaretskii, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Drew Adams, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Andreas Schwab, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Drew Adams, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Eli Zaretskii, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Drew Adams, 2018/09/10
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Eli Zaretskii, 2018/09/11
- bug#32562: 26; `read-char(-exclusive)' and `characterp', Drew Adams, 2018/09/11