From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44155: Print integers as characters Date: Wed, 28 Oct 2020 17:51:25 +0200 Message-ID: <83h7qecps2.fsf@gnu.org> References: <877drh7unm.fsf@igel.home> <87lffxuwgn.fsf@mail.linkov.net> <87d0172yev.fsf@mail.linkov.net> <83mu0afcex.fsf@gnu.org> <87wnzenmwc.fsf@mail.linkov.net> <83imayf5f2.fsf@gnu.org> <878sbrc317.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6195"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44155@debbugs.gnu.org, schwab@linux-m68k.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 28 16:56:26 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXnoI-0001XG-C5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Oct 2020 16:56:26 +0100 Original-Received: from localhost ([::1]:48824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXnoH-0001bR-E3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Oct 2020 11:56:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXnk2-0005ON-4w for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2020 11:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38678) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXnk1-0002bw-OD for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2020 11:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXnk1-0003Mw-Ki for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2020 11:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Oct 2020 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44155 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44155-submit@debbugs.gnu.org id=B44155.160390029912923 (code B ref 44155); Wed, 28 Oct 2020 15:52:01 +0000 Original-Received: (at 44155) by debbugs.gnu.org; 28 Oct 2020 15:51:39 +0000 Original-Received: from localhost ([127.0.0.1]:50224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXnjf-0003MN-Eu for submit@debbugs.gnu.org; Wed, 28 Oct 2020 11:51:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXnjd-0003MA-TH for 44155@debbugs.gnu.org; Wed, 28 Oct 2020 11:51:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46691) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXnjX-0002Zr-BW; Wed, 28 Oct 2020 11:51:31 -0400 Original-Received: from [176.228.60.248] (port=4953 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kXnjT-0001tx-5v; Wed, 28 Oct 2020 11:51:31 -0400 In-Reply-To: <878sbrc317.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 27 Oct 2020 22:08:12 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191893 Archived-At: > From: Juri Linkov > Cc: schwab@linux-m68k.org, 44155@debbugs.gnu.org > 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.