GNU bug report logs - #76611
30.1; Elisp manual: Say what it means for a char to be printable

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76611 in the body.
You can then email your comments to 76611 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76611; Package emacs. (Thu, 27 Feb 2025 17:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Feb 2025 17:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 30.1; Elisp manual: Say what it means for a char to be printable
Date: Thu, 27 Feb 2025 17:48:40 +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'.

Please say what's meant by "printable" for `printable-chars'.

[ 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. ]


In GNU Emacs 30.1 (build 2, x86_64-w64-mingw32) of 2025-02-20 built on
 AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.5487)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation=aot
 --without-compress-install --with-tree-sitter CFLAGS=-O2
 prefix=/g/rel/emacs-30.1-rc1'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76611; Package emacs. (Fri, 28 Feb 2025 14:34:03 GMT) Full text and rfc822 format available.

Message #8 received at 76611 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 76611 <at> debbugs.gnu.org
Subject: Re: bug#76611: 30.1;
 Elisp manual: Say what it means for a char to be printable
Date: Fri, 28 Feb 2025 16:32:55 +0200
> Date: Thu, 27 Feb 2025 17:48:40 +0000
> From:  Drew Adams via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> (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.

> [ 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76611; Package emacs. (Fri, 28 Feb 2025 17:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 76611 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "76611 <at> debbugs.gnu.org" <76611 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#76611: 30.1; Elisp manual: Say what it means
 for a char to be printable
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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 28 Feb 2025 18:57:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Fri, 28 Feb 2025 18:57:02 GMT) Full text and rfc822 format available.

Message #16 received at 76611-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 76611-done <at> debbugs.gnu.org
Subject: Re: [External] : Re: bug#76611: 30.1; Elisp manual: Say what it means
 for a char to be printable
Date: Fri, 28 Feb 2025 20:56:02 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "76611 <at> debbugs.gnu.org" <76611 <at> debbugs.gnu.org>
> Date: Fri, 28 Feb 2025 17:56:03 +0000
> 
> > 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.

Done now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 29 Mar 2025 11:24:14 GMT) Full text and rfc822 format available.

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.