GNU bug report logs - #44155
Print integers as characters

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 22 Oct 2020 21:12:01 UTC

Severity: normal

Tags: fixed, patch

Done: Mattias EngdegÄrd <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 44155 <at> debbugs.gnu.org, rgm <at> gnu.org, schwab <at> linux-m68k.org
Subject: Re: bug#44155: Print integers as characters
Date: Sun, 01 Nov 2020 20:51:54 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: rgm <at> gnu.org,  44155 <at> debbugs.gnu.org,  schwab <at> linux-m68k.org
> Date: Sun, 01 Nov 2020 20:39:48 +0200
> 
> >>  	if (EQ (Vinteger_output_format, Qt) && CHARACTERP (obj)
> >> -	    && (c = XFIXNUM (obj)))
> >> +	    && (c = XFIXNUM (obj)) && ! CHAR_BYTE8_P (c))
> >
> > If a test fails, it is better to fix the test and not make the code
> > less powerful, don't you agree?
> 
> This means sweeping the problems under the carpet.

Which problem?

> >   (decode-char 'eight-bit ?\200)
> >
> > Can't this be used in the test?
> 
> Using this code in tests means that the users should use the same code
> in their programs.

Why would they need to do that?  The test needs it because it wants to
verify the result, but "normal" programs don't need to read back the
values they printed.

> Thus 'print' should print '(33 4194176) as such ugly code:
> `(?! ,(decode-char 'eight-bit ?\200))

I don't see why.  ?\200 and 4194176 are two forms of the same
character.




This bug report was last modified 4 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.