Subject: RE: [External] : Re: bug#76611: 30.1; Elisp manual: Say what it means for a char to be printable

From: Drew Adams <[email-masked]>
Date: Fri, 28 Feb 2025 17:56:03 +0000

> > (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.