GNU bug report logs -
#76611
30.1; Elisp manual: Say what it means for a char to be printable
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Thu, 27 Feb 2025 17:49:02 UTC
Severity: normal
Found in version 30.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > (elisp)`Character Properties' describes variable `printable-chars',
> but
> > it doesn't say what "printable" means in this context. Please add
> > something about that.
> >
> > Searching the manual elsewhere, we find only a mention in node `Usual
> > Display' of "printable ASCII characters" and non-printable ASCII
> control
> > characters".
> >
> > But the printable chars, in general, are not limited to printable
> ASCII
> > control chars, so this mention doesn't help with understanding
> > `printable-chars'.
>
> If you don't know what are printable characters, how did you deduce
> that they are not limited to ASCII? (No, don't answer that.)
>
> > Please say what's meant by "printable" for `printable-chars'.
>
> I added on the master branch a cross-reference to where the [:print:]
> regexp character class is described, because that's what "printable
> character" means in Emacs.
>
> But the more serious problem with the printable-chars table was that
> its value was incorrect for many Unicode codepoints; I fixed that as
> well.
Thank you!
> > [ And I wonder if something shouldn't perhaps be added about (Lisp)
> > readability in this context. Some things in Lisp have a print
> > representation but that can't be read by the Lisp reader. I believe
> all
> > printable chars can be read by the reader. It wouldn't hurt to
> mention
> > this. ]
>
> I don't understand what you are trying to say here. Is something
> missing from the "Character Type" node of the ELisp manual and its
> sub-nodes, wrt the read syntax of characters?
I had in mind just mentioning in the context of the
doc about printable chars that what's printed can
be read by the Lisp reader.
This is different from the read syntax of character
objects: ?<CHAR>. It's not about reading character
objects as such. It's about the reader's handling
of printable chars.
(aref printable-chars ?^L) => nil (pretend it's ^L)
A Ctrl-L char isn't read by the reader, e.g. as part
of a symbol name.
But now that I think about it, it would probably be
more confusing than helpful, because to explain it
would dig a new rabbit hole, to no good.
Feel free to close, if you haven't already.
This bug report was last modified 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.