Subject: Re: bug#44155: Print integers as characters

From: Eli Zaretskii <[email-masked]>
Date: Wed, 28 Oct 2020 17:51:25 +0200

> From: Juri Linkov <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 27 Oct 2020 22:08:12 +0200
> 
> > Alternatively, we could print raw bytes in some special way.  But not
> > treating them as characters sounds some subtlety that will be hard to
> > explain.
> 
> The existing 'prin1-char' used as a reference implementation
> doesn't print integers like 4194176 as characters, so the patch
> does the same.

I don't think it's right, FWIW.  Displaying something like \100 would
be better, IMO.

> +@defvar integer-output-format
> +This variable specifies how to print integer numbers.  The default is
> +@code{nil}, meaning use the decimal format.  When bound to @code{t},
> +print integers as characters when an integer represents a character
> +(@pxref{Basic Char Syntax}).  When bound to the number @code{16},
> +print non-negative integers in the hexadecimal format.

This should mention the functions affected by the variable.

> +** New variable 'integer-output-format' defines the format of integers.
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"determines how to print integer values"

> +When this variable is bound to the value 't', integers are printed by
> +printing functions as characters when an integer represents a character.

Please give at least one example of a function affected by this.

Thanks.