From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters Date: Sat, 11 May 2024 12:54:47 +0200 Message-ID: <87pltsboug.fsf@web.de> References: <87ikzl8bmj.fsf@gmail.com> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24854"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70868@debbugs.gnu.org To: No Wayman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 11 12:55:22 2024 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 1s5kNt-0006Jj-3w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 May 2024 12:55:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5kNc-0005EI-Sy; Sat, 11 May 2024 06:55:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s5kNb-0005E8-8B for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 06:55:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5kNa-0002ai-UV for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 06:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5kNa-0002Tu-3y for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 06:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 May 2024 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70868 X-GNU-PR-Package: emacs Original-Received: via spool by 70868-submit@debbugs.gnu.org id=B70868.17154248519521 (code B ref 70868); Sat, 11 May 2024 10:55:02 +0000 Original-Received: (at 70868) by debbugs.gnu.org; 11 May 2024 10:54:11 +0000 Original-Received: from localhost ([127.0.0.1]:47696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5kMl-0002TU-1Z for submit@debbugs.gnu.org; Sat, 11 May 2024 06:54:11 -0400 Original-Received: from mout.web.de ([212.227.15.4]:53743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5kMj-0002TK-0v for 70868@debbugs.gnu.org; Sat, 11 May 2024 06:54:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1715424843; x=1716029643; i=michael_heerdegen@web.de; bh=GjeUkGLQfOhdp29bRvTenjnx8LNkIK6VnV2tEI8/Eyc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=VLhxsK+9GXma5bdS2BVDcaRPcRJPcs0jdgjWu9WHjcTHjyRP04P09h7amdJ4xfC7 1qQvPZuabSdaJV9HAj2PWfZhnN2ugqWL1loMQf6LIUB7LL/Bpfgqe6mWHByX1gRVJ 39mAXb35SiRsM183H/jlK2vIrBMb0wTfnmVv7wpqXAG1Z4vZ1fGu27aXAc7YAu2sR PGzafsUHkmtXoW63N6Fp+QppjEPBp6R+6QVFj97AN45vyv42AlXudfnRmJLpj5glL DHN+v7mDvxIGTnDWUGxg+z3mSY/o+EAFaEKgUze9mh5JSQ6/Bj3wAk8OsEi+c+UqU TLiPV/4pIKfW3bS59A== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Myf3x-1sodx00JR7-017E9N; Sat, 11 May 2024 12:54:03 +0200 In-Reply-To: <87ikzl8bmj.fsf@gmail.com> (No Wayman's message of "Fri, 10 May 2024 19:56:20 -0400") X-Provags-ID: V03:K1:vEYmfhSwYqCTVZC2v3EM8sQiXXes1nZHOkxJOxsLEclKIqKn/Sd /ghd1v9X+MJPIe9rJ0LnYhSE8a/ljEUvwtzsR17KiAq+2SiHqUFbcrqohBlFqkIUcwuIL+P JU1pNf0EIqJmipsLKKs4qWX2OmHFawIVywNxEZhIH3wo6vUy4pzu02zaNMDq6JrKdFhup/4 EClMEtIpVQcQ3+bg9yVtw== UI-OutboundReport: notjunk:1;M01:P0:k6Bfk2eST5s=;9G0UqtJJ33mCt+RIjLLys3RWPTN fWLWgWCktbroF7Lwd88jGBYdKEdzLCkCEDt98/8HMAxEelinnHfsbonz/9VE2UGO/4IGck0hI zYKlK69ReYLZuxzA/nP4NsuMqAZAfjJkrem4fbBdGlr3eO8XfWyPc07LTzk44m4NoYypQ+po5 fgAa0j6Z4RrASf1wNTfWOvGrXCi/qxMOW6mWnKjOPqs06D1PCSC+iWrUIEODTefUy2RHb1iAt f8dkmZBOF/xM+Sh2fZi0/ivyIM6i3VeytKaRSFTc51cG5lGIuD77C7Sp2pvx2ncZZIPfYYwwx 6sxlLj0JgUZQXZ6feV1KxUIqp9Ckj+aXzbVPRwl4kmMSmoJBsVNuZxehvHqCfUb8wbftP6Hj5 gr3QulAxrKUTzxFFj6nt9tkMAr7zT6dhNUyh0uBhwyzxDKpTiM8x4HKHOLm6RDpn+SccbJDxk awCWh4wfTM5/EDtv3D58depnxg2MmdFy98Xrg4dz8Cdr5tg98RwejmAA9Qi3qDUOVhRgZSvqZ CcBTBlI+TgrAOrCY230d2OU5fznPQyATrFCC2y3Kv2CFmRiLSXMwAol7PJqH6rH1vVnqJ1DAH 62qR4/+H1CD20iBAuNbneaW1/6QSS8pWJNNygiEPvyeh1tqku3sEtY9MKd8+gr/cKy8r6oPIy oMWW3Jp/rJfw2TTaKijcE44v/qZuhV3L2oleB4kHfPKjx3bIzIx/KDuDUq5XVabyGXh0hFTGj 6KxOXjxJvLbYFnALdioIvyPmUtg/BmYRwAbP/cvvdLtAwZ96jJh9g/9Of97v3OVKECHYxc8N 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284858 Archived-At: No Wayman writes: > From the body of pp--insert-lisp in pp.el: > > ```emacs-lisp > ;; Print some of the smaller integers as characters, perhaps? > (integer > (if (<=3D ?0 sexp ?z) > (let ((print-integers-as-characters t)) > (princ sexp (current-buffer))) > (princ sexp (current-buffer)))) > ``` > > I stumbled on this behavior in a program of which pretty prints > elisp forms as part of a report. > I don't want characters when the input form originally included > integers. > Why do we do this here? The commentary doesn't offer any insight > and sounds confused about the behavior, too. No, this had been done intentionally of course - and AFAIU, the comment only asks whether to include even more characters. The code currently guesses which syntax is more likely to be satisfying. > Is it worth making configurable, or outright removing? We could make it configurable, but note that this will not avoid this kind of problem: one and the same expression can include numbers in that range that are "meant" as characters and others that are "meant" as integers. Characters being printed as integers is likewise annoying as the opposite problem. Anyway, adding a user option will probably be the best solution we can implement. Michael.