GNU bug report logs -
#32562
26; `read-char(-exclusive)' and `characterp'
Previous Next
Full log
Message #13 received at 32562 <at> debbugs.gnu.org (full text, mbox):
> forcemerge 13599 32562
> quit
>
> > 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'.
>
> This is bug#13599/1042
Hm. Maybe it is. But is `read-char' necessarily about chars that satisfy `characterp'?
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.)
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—like ‘single-key-description’, 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" returned 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 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?).
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 deserve adjustment, and the doc might deserve some clarification/fixes. We might need to decide what the right behaviors are first.
This bug report was last modified 6 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.