GNU bug report logs - #70868
30.0.50; pp--insert-lisp prints small integers as characters

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: No Wayman <iarchivedmywholelife@HIDDEN>; dated Fri, 10 May 2024 23:57:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 14 May 2024 22:31:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 18:31:01 2024
Received: from localhost ([127.0.0.1]:41519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s70fk-0006H1-N0
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 18:31:00 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s70fh-0006Gt-55
 for 70868 <at> debbugs.gnu.org; Tue, 14 May 2024 18:30:59 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A89C88098B;
 Tue, 14 May 2024 18:30:49 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715725848;
 bh=GUV8MgRw8B7lRanIUToUqOXndo/iG4j4dibd8VNPSk0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=OkmmxSx6Twdcz8dZ6b3SDuHat74uZZyb7RFQ59I+rXTmnOWLhjcfkkcZBwMplP5oy
 X+L4VReTSe8SAlYP3y2/th6Y8JAuhzxhHoWDXTHMq1d787RHvkjS3TowtWbYa6u92k
 MSn4Vy4n9t7P+xKOcKdoW+xgBSPlMznjKlcIbGmUVKZu7Cn8ypUAHA9vEsrDm71CFq
 Ye+4AZwn4VSFV4cjRjo1cwMmkBxsSGgNXpE1HMFdH/5rqDrM/SZaLxcXZYKmSM9Ull
 TceQ/ilQI39Di5b3y9nIbdABLTAjGY1q3Nz1CRj0l3uy4A8YNwHltbcbLsYffqIrFF
 cFJHoLigs13GA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A594280357;
 Tue, 14 May 2024 18:30:48 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97AEF120234;
 Tue, 14 May 2024 18:30:48 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <87cypomesl.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 14
 May 2024 20:25:30 +0200")
Message-ID: <jwv4jb0hvu1.fsf-monnier+emacs@HIDDEN>
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> <87cypomesl.fsf@HIDDEN>
Date: Tue, 14 May 2024 18:30:48 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.163 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: Eli Zaretskii <eliz@HIDDEN>, iarchivedmywholelife@HIDDEN,
 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> `prin1` will have its share of downsides, I guess, but when printing
>> "arbitrary data", it's definitely a safer choice than `princ` which
>> is rarely the right thing (except when printing strings, obviously).
> I hope you only mean strings that contain the printed representation of
> an object.  Our `pp--insert-lisp' prints strings in the argument with
> `prin1' (of course).

That comment was not specific to `pp--insert-lisp', but much
more general.  As a general rule of thumb `princ` should be called only
with a string as argument (same thing for %s vs %S in `format`).

> Thanks for that comment - I updated the patch to use `prin1-char':

LGTM,


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 14 May 2024 20:16:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 16:16:17 2024
Received: from localhost ([127.0.0.1]:41315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6yZN-0007W1-JP
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 16:16:17 -0400
Received: from mout.web.de ([212.227.17.11]:47009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6yZK-0007Rd-CY
 for 70868 <at> debbugs.gnu.org; Tue, 14 May 2024 16:16:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715717756; x=1716322556;
 i=michael_heerdegen@HIDDEN;
 bh=wh/ZFyajMKItpzsius5iGxJFE2jEqBwV3tIcMznB6m0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=b5Hy52ctxvhLG9X9jwX0I8mb93smiT1mwhGIjmDLvSPEGyMFgAp0LyLrLLuXkQmE
 kj3/gVbthC31m52VQgkg7fc9GlFbZCGC/QarQWBy94XsdfjzFZa3qA8xTc6mXoFAC
 4wvjJmIHHJWZwtjx/XosFongguxndDUkuv+c5UqbY0kLv8HuKVutnT34Fr2aHT0Oh
 nYnSsIsu5TKXCP/9MIs0JY5x9NqmCfExX8v8oY8uU1GauOrXVeshMukOzLHmFyFgH
 RFnPboiPsFXIIvr3+40ZZ8V04kbs26nkiWbDtoKcNr6c+Z2g0f1U7fjfJvZmjVd5t
 durz9kh4cR0qSfZS5w==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MHEXi-1sKE5z3be4-001ACu; Tue, 14
 May 2024 22:15:55 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <877cfwment.fsf@HIDDEN> (Michael Heerdegen via's message of "Tue, 
 14 May 2024 20:28:22 +0200")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> <877cfwment.fsf@HIDDEN>
Date: Tue, 14 May 2024 22:16:39 +0200
Message-ID: <87ttj0kv2w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5YhFM1VLk2togzSf+olhXxN7KrgghGkvBXJH3rtr3zmj+reGlZO
 YiV37bwGRdrP6ZzOFCQi8I/AKYvjZIn7mdGZWo1WqlEZmfECyErK3/e4jm64RLLE8KspPR7
 4tYBAlkzLc1j87iSZdM2Tb3NWups5oqf3EFKI5E5dwpcDdUNMXfbQK4OC5fXjwZz5WTWu6J
 LGAZbPivtG08qqMKdIJ/g==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:o5CHjK9aO2Y=;cGQAuRy9+guCxFIqWqK3znohtbQ
 7GXOx2SvLoGcoDzU55LLYpPg4wRpheED/Ali0w390xYm91PO1JaVWcmjIVFItPWrWBYYd/uYN
 FAVgOLFjMUeaHKwD7FYaLksOidsx1g/a3yVoBMWXQXkXdP5tpoR099vO6QemLslklxDGxVcFc
 FmCsu+7vzgIBCnMLAljHw2jYmuPGgxNKvPSwWqlA3EHeGoG7co0tzuaSwMUmOyKSx1CGQLW41
 AKfoIPW0BD5W/L/ysQ1BMn6jwSH02YQ8koFQnW6blhXukTlkldq8ajoUepu4oMNrTe+9vCyjM
 VUgvT8B1bpLSAeW9ETcOqKlhaWc1K57JcLKSzp+SHf1P/GqyDXEj1Rvb1P5YjLZMiLR3QYqzc
 +4h7Q8LsQ87DaRr1rd1jbtMRxPUvFbYSv65OeVkHq9tez/G5WzVmqV5tq90NogNbqJAVJQzjm
 bw6HsU0sGpxdUD5SUZzQmxvnzoIBl2vEa9P08Vqehwqy3YGealvygOvJnOd66WDYoqZBnQZOu
 yOCPNUwViC+U067DwlCZ2ff2uzAbhi05jDq+k05VcmIcVb0qjJYv7pAkLbjKr0zpYN1JtpYRd
 5eje64frb0lVVdiPxsOnjgVKcFqhFgcNhrv4lc/kGBOlQ/hiP2JBz3/Sa8eERuA65Wv9le+UA
 59j9KfPeOaTNTbZNwQOtUA6m6a7wsLd3AlzpgC6l0XA6Pkh0f3OESSc23Nv6n/Tehb93H0Mkx
 99D0HGhI4IEGR40aRrRzKhqEpIfgPs/FOodeSx0JJfh/EuUIzDJBBwjk4AFyKpq72hZQZRz6C
 PrwIIPQz9u/F+7dZ5mBJ0KFlgAcklD3z8qmYcQ5PpTYRU=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 70868 <at> debbugs.gnu.org, iarchivedmywholelife@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@HIDDEN> writes:

> Did I forget to attach the patch?

Eh - no, I didn't - please forget my last message.  How embarrassing...

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 May 2024 20:16:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 16:16:27 2024
Received: from localhost ([127.0.0.1]:41319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6yZW-0007WJ-TX
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 16:16:27 -0400
Received: from lists.gnu.org ([209.51.188.17]:36374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6yZU-0007W9-Qc
 for submit <at> debbugs.gnu.org; Tue, 14 May 2024 16:16:25 -0400
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 <michael_heerdegen@HIDDEN>)
 id 1s6yZQ-0008ED-0B
 for bug-gnu-emacs@HIDDEN; Tue, 14 May 2024 16:16:20 -0400
Received: from mout.web.de ([212.227.17.11])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1s6yZM-0005TY-V7; Tue, 14 May 2024 16:16:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715717756; x=1716322556;
 i=michael_heerdegen@HIDDEN;
 bh=wh/ZFyajMKItpzsius5iGxJFE2jEqBwV3tIcMznB6m0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=b5Hy52ctxvhLG9X9jwX0I8mb93smiT1mwhGIjmDLvSPEGyMFgAp0LyLrLLuXkQmE
 kj3/gVbthC31m52VQgkg7fc9GlFbZCGC/QarQWBy94XsdfjzFZa3qA8xTc6mXoFAC
 4wvjJmIHHJWZwtjx/XosFongguxndDUkuv+c5UqbY0kLv8HuKVutnT34Fr2aHT0Oh
 nYnSsIsu5TKXCP/9MIs0JY5x9NqmCfExX8v8oY8uU1GauOrXVeshMukOzLHmFyFgH
 RFnPboiPsFXIIvr3+40ZZ8V04kbs26nkiWbDtoKcNr6c+Z2g0f1U7fjfJvZmjVd5t
 durz9kh4cR0qSfZS5w==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MHEXi-1sKE5z3be4-001ACu; Tue, 14
 May 2024 22:15:55 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <877cfwment.fsf@HIDDEN> (Michael Heerdegen via's message of "Tue, 
 14 May 2024 20:28:22 +0200")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> <877cfwment.fsf@HIDDEN>
Date: Tue, 14 May 2024 22:16:39 +0200
Message-ID: <87ttj0kv2w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5YhFM1VLk2togzSf+olhXxN7KrgghGkvBXJH3rtr3zmj+reGlZO
 YiV37bwGRdrP6ZzOFCQi8I/AKYvjZIn7mdGZWo1WqlEZmfECyErK3/e4jm64RLLE8KspPR7
 4tYBAlkzLc1j87iSZdM2Tb3NWups5oqf3EFKI5E5dwpcDdUNMXfbQK4OC5fXjwZz5WTWu6J
 LGAZbPivtG08qqMKdIJ/g==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:o5CHjK9aO2Y=;cGQAuRy9+guCxFIqWqK3znohtbQ
 7GXOx2SvLoGcoDzU55LLYpPg4wRpheED/Ali0w390xYm91PO1JaVWcmjIVFItPWrWBYYd/uYN
 FAVgOLFjMUeaHKwD7FYaLksOidsx1g/a3yVoBMWXQXkXdP5tpoR099vO6QemLslklxDGxVcFc
 FmCsu+7vzgIBCnMLAljHw2jYmuPGgxNKvPSwWqlA3EHeGoG7co0tzuaSwMUmOyKSx1CGQLW41
 AKfoIPW0BD5W/L/ysQ1BMn6jwSH02YQ8koFQnW6blhXukTlkldq8ajoUepu4oMNrTe+9vCyjM
 VUgvT8B1bpLSAeW9ETcOqKlhaWc1K57JcLKSzp+SHf1P/GqyDXEj1Rvb1P5YjLZMiLR3QYqzc
 +4h7Q8LsQ87DaRr1rd1jbtMRxPUvFbYSv65OeVkHq9tez/G5WzVmqV5tq90NogNbqJAVJQzjm
 bw6HsU0sGpxdUD5SUZzQmxvnzoIBl2vEa9P08Vqehwqy3YGealvygOvJnOd66WDYoqZBnQZOu
 yOCPNUwViC+U067DwlCZ2ff2uzAbhi05jDq+k05VcmIcVb0qjJYv7pAkLbjKr0zpYN1JtpYRd
 5eje64frb0lVVdiPxsOnjgVKcFqhFgcNhrv4lc/kGBOlQ/hiP2JBz3/Sa8eERuA65Wv9le+UA
 59j9KfPeOaTNTbZNwQOtUA6m6a7wsLd3AlzpgC6l0XA6Pkh0f3OESSc23Nv6n/Tehb93H0Mkx
 99D0HGhI4IEGR40aRrRzKhqEpIfgPs/FOodeSx0JJfh/EuUIzDJBBwjk4AFyKpq72hZQZRz6C
 PrwIIPQz9u/F+7dZ5mBJ0KFlgAcklD3z8qmYcQ5PpTYRU=
Received-SPF: pass client-ip=212.227.17.11;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 70868 <at> debbugs.gnu.org, iarchivedmywholelife@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@HIDDEN> writes:

> Did I forget to attach the patch?

Eh - no, I didn't - please forget my last message.  How embarrassing...

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 14 May 2024 18:27:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 14:27:52 2024
Received: from localhost ([127.0.0.1]:40758 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6wsR-0003E9-LJ
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 14:27:51 -0400
Received: from mout.web.de ([217.72.192.78]:60241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6wsP-0003E3-JZ
 for 70868 <at> debbugs.gnu.org; Tue, 14 May 2024 14:27:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715711259; x=1716316059;
 i=michael_heerdegen@HIDDEN;
 bh=PUzB3eL4Kvu2JDZwq6HyNItubaHh4EeHh4TCGdhXPUc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=jspVUnUlLMBZyWR5LMRcKc79TxVCvLW34jSYqcd3g1DMQlhbLA6EdMwVAyQaKck6
 Uu/tPe9usk6YcSot9Bfsv2r92AJmOly4+IXNPIB/g1nWEs7NZgWJkghAQfrhLQacA
 vxOD38WFAaaW7UG7TrMbdClATux2CTyvK1yXS/C/pxUxecwxAJJya4mgpxhh28LjQ
 u5ldXHtM0umoo/Juj2XkuyxtoivCwAwGy8uFl17cVPzgDJXhFF13hoaWMLIsBJKma
 aFyoqurSWiWs5gPuyzPpUIL1WIvlngPluQSywUFTL4Qa0RHXjz30IqD7+LVLi/Tf8
 NQst1cIQQ2XJxhVfTA==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MnpGi-1supov0IYs-00dF9O; Tue, 14
 May 2024 20:27:39 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 12 May 2024 17:39:46 -0400")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN>
Date: Tue, 14 May 2024 20:28:22 +0200
Message-ID: <877cfwment.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:koLElkLw+v7zAOnd+PZNQVSCR4u4bGMJH+HByxpTVT33tP8eBRo
 Qu1qmq9L5BVoljwEpZg0PFZyWIEx3gjpRagdveCybJrgj2xAzMdR6vW52M19fBOukKyd+B6
 T5UZq36gUdmujxq42cOwuGKWyKFR1TLTZ0hv3yEbYOrVWkxAp2d/goFnt2XY36QSVbJ+vIO
 L7g21mVcGmAWdfrXWqQdg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:BiV7cRcDe2Y=;PiyvRMlKSWXypzJpRqcXwmqyk23
 jkBuyoyS9MmFTgK+t1G1rciTwsTyywO1abUZmN1sSfFgwpuujGXoQGmwexOJZJbmSGIps5qNE
 U/RoCaAgC5lfTkQ+lFB/qI2s4svYni8lvBeaux0OV6HbqxdnEmFAXAMtYgBCdI9YKN5/yw/WF
 KgVs7ir/Zc+nxQ/iezzzbU+HT+qF5hUig/hU1nKIj9p5zrOgu32Dep06pK0hzQu5QBW0nesnd
 2HLurDkHOoCukWYd9c3dhun4ZW4O35PuDlbmqwvMXx1OGAVLoMfYHh57478P+Ae1HaO0EciAj
 iXo/u8fsy8eJc8/rj86Cbm9QIb+NP5e/FxFkU2lf1oPP/iZ8zQ9TgoZyKPSul3szNcWlVH4Z4
 eoA0/6vIYsNSF6h8L9oYDhknVeTXjNkWz5fxaXqxBGhr7u1C1R39OgVn7gtH89u7Siy72M2yC
 sxt062aqcX78gV5asIwW1av7cNN4qrNF4LvUcNPngDNC8/MqKbMgIonRAFg0qi9/T+WYalhq0
 jOLhGiBbq8guysK2GFiv2vmB7bEx8CjWDMYvSCN+Mme+iVRe2m8FWofhqhINt6vXtRXjKjXvI
 sktPsvS+kMdNXeXilssSM84SMiOyR+o0WvF+stFFLok4bB8/dXS3l05dwuQj7zMGYvbgP1cEx
 Muv/8HcKmTmS4ClHsSxPzoP7r78jO1EyIV0Y0EYcWQrM+lZjdrWgSIQ0nOq11EHIjEIlv2EHA
 pqXJmJ54P2VYH2dTlcJxpUzxrQA5o8Au8rk8GZ79lDWNA4DyMjV2xV0IbWGNtR5HrfA7i/Ang
 dfvJb9Z9k881IJT4HdgxNwog0UvSzeTpIl7s9pe5lco9k=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: Eli Zaretskii <eliz@HIDDEN>, iarchivedmywholelife@HIDDEN,
 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Stefan Monnier <monnier@HIDDEN> writes:

> This said, I don't see the connection with printing small numbers as
> chars.  To print chars using the ELisp syntax you need `prin1-char`:
> AFAIK neither `prin1` nor `princ` work (at all).

Did I forget to attach the patch?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Further-tweak-pp-code-printing.patch
Content-Transfer-Encoding: quoted-printable

=46rom e041c3a9d295f4c9946bcb693591eb47237cc4fe Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Sun, 12 May 2024 19:55:30 +0200
Subject: [PATCH] Further tweak pp code printing

This fixes an aspect of Bug#70868.

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print characters with
`prin1-char'.  In all other cases consistently print with `prin1'.
=2D--
 lisp/emacs-lisp/pp.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 47805d3dbde..1ca206cf5db 100644
=2D-- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -495,15 +495,12 @@ pp--insert-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))))
+         (princ (prin1-char sexp) (current-buffer))
+       (prin1 sexp (current-buffer))))
     (string
      (let ((print-escape-newlines t))
        (prin1 sexp (current-buffer))))
-    (symbol
-     (prin1 sexp (current-buffer)))
-    (otherwise (princ sexp (current-buffer)))))
+    (otherwise (prin1 sexp (current-buffer)))))

 (defun pp--format-vector (sexp)
   (insert "[")
=2D-
2.39.2


--=-=-=
Content-Type: text/plain



Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 14 May 2024 18:25:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 14:25:13 2024
Received: from localhost ([127.0.0.1]:40739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6wpt-0003CR-BZ
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 14:25:13 -0400
Received: from mout.web.de ([212.227.17.12]:41339)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6wpm-0003Bv-Tj
 for 70868 <at> debbugs.gnu.org; Tue, 14 May 2024 14:25:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715711087; x=1716315887;
 i=michael_heerdegen@HIDDEN;
 bh=w9/ge1PUeVX+ZXBtEo8dLE79t0prJRAUPu4S+lg9a08=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=UV5m46JnVEWNCuAl307oxRh+ysDVJ4YIR6vVaB/Ig83rEHjaHAY0/Wb8iGzM86RT
 Fm1NKfjn5ntjqkO5VW/vE6uk8uVCzhYLkMHwnpBqQWW/4kAqhw2YdKWqRslE90wdG
 kSZEsvwXTjl5pObo5d4PVmp/tMFSPQePdNHI+NTS4ra/H5YTQRKvxlhjY+BYUMmac
 A4HM7PPq74U2poMNAn+maRSy/4ZU09gPCRP+nSHw/EaOFpBbQ8b/0btv4Sg9etju/
 C36K0oRARSXkOZFjrPvp9ae9Z2QIBn7WcRqoEZ095XA8j75Lrd9AfH3CsqfU3OmAt
 5vnRhjp2lnCrGQ0y9g==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N8Vop-1sbO0d3RVR-014Vt6; Tue, 14
 May 2024 20:24:46 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Sun, 12 May 2024 17:39:46 -0400")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN>
Date: Tue, 14 May 2024 20:25:30 +0200
Message-ID: <87cypomesl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:2hawpr6gIeHOLjVE2JgQqzNXFZE0WaBh9ozleOdpZK5DzF+tvRR
 D7H2ZuG9O1JQtm/Nq9CSB8ylhdXdf4Zorxc3BEqId4YvaJ0FpSdRfaAgOuAIlH7U6954hjh
 fn5jE7un8pnPgJrLzpMjREJTBfYaZC3mvlV0owiECNrVQ9p72LYHEu5LDo43iW1g1VExGPW
 Sn5ItXmiRjhS39FFJrHrQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:v1mbxZs/7YU=;nSkNdC4GJXfOss2+NgriGzHpzq2
 dnxMOWZpTwzmvlZ1/iUQ6T8LI8gatztonrg6APt6N/YwOMYIvpxGRBcXe6I7SEJaKmW+DrzH1
 5XYjXPA2UtLELsAMGV6KDaxiE7ItJMXWGOWA0T9kPXTjiDRxnIRCZvnT4N3NtcsWxM1C9EfYV
 deLEeU8etvWECFkayYYNMVAtNdM6Sij+dW8I4Hy7GK7vQ6WXV4iAgjlhLA7i7cIoX7lOS/IEn
 nh7EfK7A4vMPW9geC/hDhaaRCCDdbpDhdx0WXEeqcV/sQERxs6nU1zcePAeLqUFmKjcTuvWdK
 4Wpek/m/QKY525CdC1Kt5x6VzkFm9tSQjO7vRYNsH9/139qUCdYEPFODIJpcC6NpYbsFGC0Vi
 fmNbXzRlbdZBpOrUU6quVvczvmpHGAmLlhg8UjRiPG4IG772plGjOO/ypOrg6tf8k8LPk1fOe
 XghrD7s2tuLgKhxw/nb6gkq1NJ8SupGAZHN9DJ+XUixApXp3OMR/admDh9C1GEiPTrTTPRRgT
 czmtGrsSibNbCLqvUiTAlpMf/0M1PiLgqvbdpru5EEjT4nUi91xs7EXhEpY/nNl9cPZx+gqTL
 d4GyMUeDPFoKD23ZQQNBwPkd5+yJOvmI0hOmsJEYN6syPAhyrU4sRfxrTo6WjXnstQ0KAT9Zg
 rokR7vU+mmNE4n1QV3kLF9e/ZPH1AixSRtsDg5eoaYaAVewX8ilx3mFKjN5j8niVKShOLxUGr
 39KH/L4ZT7Whlv2hmLGPWQPermSaEWWAnmRrSnlS/dIT+37TtvUS7TraaXNzs3mjIkJQbC/Na
 76xQaAODwUO+UTLXYcyTK46UKjPmsDUegbz95/C+Olau8=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 70868 <at> debbugs.gnu.org, iarchivedmywholelife@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

> `prin1` will have its share of downsides, I guess, but when printing
> "arbitrary data", it's definitely a safer choice than `princ` which
> is rarely the right thing (except when printing strings, obviously).

I hope you only mean strings that contain the printed representation of
an object.  Our `pp--insert-lisp' prints strings in the argument with
`prin1' (of course).


> This said, I don't see the connection with printing small numbers as
> chars.

There is none - but we constantly keep replacing every single `princ'
with `prin1' in that function, one after the other, so I suggest to
switch to `prin1' for all objects and see if anything remains where
that behaves unintuitively.

> To print chars using the ELisp syntax you need `prin1-char`: AFAIK
> neither `prin1` nor `princ` work (at all).

Thanks for that comment - I updated the patch to use `prin1-char':


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Further-tweak-pp-code-printing.patch
Content-Transfer-Encoding: quoted-printable

=46rom e041c3a9d295f4c9946bcb693591eb47237cc4fe Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Sun, 12 May 2024 19:55:30 +0200
Subject: [PATCH] Further tweak pp code printing

This fixes an aspect of Bug#70868.

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print characters with
`prin1-char'.  In all other cases consistently print with `prin1'.
=2D--
 lisp/emacs-lisp/pp.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 47805d3dbde..1ca206cf5db 100644
=2D-- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -495,15 +495,12 @@ pp--insert-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))))
+         (princ (prin1-char sexp) (current-buffer))
+       (prin1 sexp (current-buffer))))
     (string
      (let ((print-escape-newlines t))
        (prin1 sexp (current-buffer))))
-    (symbol
-     (prin1 sexp (current-buffer)))
-    (otherwise (princ sexp (current-buffer)))))
+    (otherwise (prin1 sexp (current-buffer)))))

 (defun pp--format-vector (sexp)
   (insert "[")
=2D-
2.39.2


--=-=-=
Content-Type: text/plain



And I would leave the specially handled range of integers as is.  Look:
there are really pathological cases that are very ugly.  For example,
?\n competes with 10, a very frequently occurring integer.


Thanks,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 May 2024 18:25:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 14:25:39 2024
Received: from localhost ([127.0.0.1]:40744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6wqI-0003Cl-QS
	for submit <at> debbugs.gnu.org; Tue, 14 May 2024 14:25:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:38378)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6wqE-0003Cf-7J
 for submit <at> debbugs.gnu.org; Tue, 14 May 2024 14:25:38 -0400
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 <michael_heerdegen@HIDDEN>)
 id 1s6wq4-0002HI-OG
 for bug-gnu-emacs@HIDDEN; Tue, 14 May 2024 14:25:25 -0400
Received: from mout.web.de ([212.227.17.12])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1s6wpu-0005cf-Lq; Tue, 14 May 2024 14:25:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715711087; x=1716315887;
 i=michael_heerdegen@HIDDEN;
 bh=w9/ge1PUeVX+ZXBtEo8dLE79t0prJRAUPu4S+lg9a08=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=UV5m46JnVEWNCuAl307oxRh+ysDVJ4YIR6vVaB/Ig83rEHjaHAY0/Wb8iGzM86RT
 Fm1NKfjn5ntjqkO5VW/vE6uk8uVCzhYLkMHwnpBqQWW/4kAqhw2YdKWqRslE90wdG
 kSZEsvwXTjl5pObo5d4PVmp/tMFSPQePdNHI+NTS4ra/H5YTQRKvxlhjY+BYUMmac
 A4HM7PPq74U2poMNAn+maRSy/4ZU09gPCRP+nSHw/EaOFpBbQ8b/0btv4Sg9etju/
 C36K0oRARSXkOZFjrPvp9ae9Z2QIBn7WcRqoEZ095XA8j75Lrd9AfH3CsqfU3OmAt
 5vnRhjp2lnCrGQ0y9g==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N8Vop-1sbO0d3RVR-014Vt6; Tue, 14
 May 2024 20:24:46 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <jwv5xviyarn.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Sun, 12 May 2024 17:39:46 -0400")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
 <jwv5xviyarn.fsf-monnier+emacs@HIDDEN>
Date: Tue, 14 May 2024 20:25:30 +0200
Message-ID: <87cypomesl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:2hawpr6gIeHOLjVE2JgQqzNXFZE0WaBh9ozleOdpZK5DzF+tvRR
 D7H2ZuG9O1JQtm/Nq9CSB8ylhdXdf4Zorxc3BEqId4YvaJ0FpSdRfaAgOuAIlH7U6954hjh
 fn5jE7un8pnPgJrLzpMjREJTBfYaZC3mvlV0owiECNrVQ9p72LYHEu5LDo43iW1g1VExGPW
 Sn5ItXmiRjhS39FFJrHrQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:v1mbxZs/7YU=;nSkNdC4GJXfOss2+NgriGzHpzq2
 dnxMOWZpTwzmvlZ1/iUQ6T8LI8gatztonrg6APt6N/YwOMYIvpxGRBcXe6I7SEJaKmW+DrzH1
 5XYjXPA2UtLELsAMGV6KDaxiE7ItJMXWGOWA0T9kPXTjiDRxnIRCZvnT4N3NtcsWxM1C9EfYV
 deLEeU8etvWECFkayYYNMVAtNdM6Sij+dW8I4Hy7GK7vQ6WXV4iAgjlhLA7i7cIoX7lOS/IEn
 nh7EfK7A4vMPW9geC/hDhaaRCCDdbpDhdx0WXEeqcV/sQERxs6nU1zcePAeLqUFmKjcTuvWdK
 4Wpek/m/QKY525CdC1Kt5x6VzkFm9tSQjO7vRYNsH9/139qUCdYEPFODIJpcC6NpYbsFGC0Vi
 fmNbXzRlbdZBpOrUU6quVvczvmpHGAmLlhg8UjRiPG4IG772plGjOO/ypOrg6tf8k8LPk1fOe
 XghrD7s2tuLgKhxw/nb6gkq1NJ8SupGAZHN9DJ+XUixApXp3OMR/admDh9C1GEiPTrTTPRRgT
 czmtGrsSibNbCLqvUiTAlpMf/0M1PiLgqvbdpru5EEjT4nUi91xs7EXhEpY/nNl9cPZx+gqTL
 d4GyMUeDPFoKD23ZQQNBwPkd5+yJOvmI0hOmsJEYN6syPAhyrU4sRfxrTo6WjXnstQ0KAT9Zg
 rokR7vU+mmNE4n1QV3kLF9e/ZPH1AixSRtsDg5eoaYaAVewX8ilx3mFKjN5j8niVKShOLxUGr
 39KH/L4ZT7Whlv2hmLGPWQPermSaEWWAnmRrSnlS/dIT+37TtvUS7TraaXNzs3mjIkJQbC/Na
 76xQaAODwUO+UTLXYcyTK46UKjPmsDUegbz95/C+Olau8=
Received-SPF: pass client-ip=212.227.17.12;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 70868 <at> debbugs.gnu.org, iarchivedmywholelife@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

> `prin1` will have its share of downsides, I guess, but when printing
> "arbitrary data", it's definitely a safer choice than `princ` which
> is rarely the right thing (except when printing strings, obviously).

I hope you only mean strings that contain the printed representation of
an object.  Our `pp--insert-lisp' prints strings in the argument with
`prin1' (of course).


> This said, I don't see the connection with printing small numbers as
> chars.

There is none - but we constantly keep replacing every single `princ'
with `prin1' in that function, one after the other, so I suggest to
switch to `prin1' for all objects and see if anything remains where
that behaves unintuitively.

> To print chars using the ELisp syntax you need `prin1-char`: AFAIK
> neither `prin1` nor `princ` work (at all).

Thanks for that comment - I updated the patch to use `prin1-char':


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Further-tweak-pp-code-printing.patch
Content-Transfer-Encoding: quoted-printable

=46rom e041c3a9d295f4c9946bcb693591eb47237cc4fe Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Sun, 12 May 2024 19:55:30 +0200
Subject: [PATCH] Further tweak pp code printing

This fixes an aspect of Bug#70868.

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print characters with
`prin1-char'.  In all other cases consistently print with `prin1'.
=2D--
 lisp/emacs-lisp/pp.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 47805d3dbde..1ca206cf5db 100644
=2D-- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -495,15 +495,12 @@ pp--insert-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))))
+         (princ (prin1-char sexp) (current-buffer))
+       (prin1 sexp (current-buffer))))
     (string
      (let ((print-escape-newlines t))
        (prin1 sexp (current-buffer))))
-    (symbol
-     (prin1 sexp (current-buffer)))
-    (otherwise (princ sexp (current-buffer)))))
+    (otherwise (prin1 sexp (current-buffer)))))

 (defun pp--format-vector (sexp)
   (insert "[")
=2D-
2.39.2


--=-=-=
Content-Type: text/plain



And I would leave the specially handled range of integers as is.  Look:
there are really pathological cases that are very ugly.  For example,
?\n competes with 10, a very frequently occurring integer.


Thanks,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 21:40:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 17:40:08 2024
Received: from localhost ([127.0.0.1]:56631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6GvQ-0001c1-LO
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 17:40:08 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4331)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s6GvN-0001bW-DQ
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 17:40:06 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 474D68060F;
 Sun, 12 May 2024 17:39:59 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715549994;
 bh=JnStudYPB6Xq1RSOQokraIhbemZABk02ayoGSgJQP6k=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=VGbQa15wrJ5YNdCjHFiP/fakbMwJak628blv+aR5hd1sF+02dxG3XxUAyhuNXDgm2
 tEb4NMNzEUuSm9ayh2LErrkoPgImK6C8J5XmU3ifnFdOBh18qz/xSR/ZC1JAbqMx0w
 910OYDNVKrzLuuAGW67e70c73YWxMsdJY9OhUfEbi5XhM1ODLdS67wVPr1y219A6dd
 Y5Qs/Sc1ky2psCZEKt16psdU71vUnE8hp77flizAyHxvu66iBVorhB9ZnWZi0DIdwU
 PVfjIsBJj5nRaZ6LtOwjXhSHmRGoDVL0FZrONN6CsUKzwtL4IPh9VqpWG1tFShUSua
 OWOIvJJbqRrKA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E98AF8036C;
 Sun, 12 May 2024 17:39:53 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B87361206BC;
 Sun, 12 May 2024 17:39:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <86frunyr3o.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 12 May
 2024 18:42:03 +0300")
Message-ID: <jwv5xviyarn.fsf-monnier+emacs@HIDDEN>
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
Date: Sun, 12 May 2024 17:39:46 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.039 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > If you are talking about the bug with 59, then Mattias suggested to
>> > exempt the semi-colon from the "display-small-numbers-as-characters"
>> > feature.
>> Yes - but independent of that I think we want to switch printing using
>> `prin1'.
> That will probably come with problems of its own...
> Stefan, WDYT?

`prin1` will have its share of downsides, I guess, but when printing
"arbitrary data", it's definitely a safer choice than `princ` which
is rarely the right thing (except when printing strings, obviously).

This said, I don't see the connection with printing small numbers as
chars.  To print chars using the ELisp syntax you need `prin1-char`:
AFAIK neither `prin1` nor `princ` work (at all).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 18:10:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 14:10:51 2024
Received: from localhost ([127.0.0.1]:55708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6Des-0007W6-KW
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 14:10:50 -0400
Received: from mout.web.de ([212.227.15.14]:46045)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6Deo-0007W0-46
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 14:10:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715537434; x=1716142234;
 i=michael_heerdegen@HIDDEN;
 bh=NwXoREzaRBiwL+gkuN/jqeqAvTYV+28lw3pd79IjzmI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=YDMTjGP6LHki1W1qZTu0cwf60PTVuVBYgfurBavw+aCjCWAtmn6ZCf4aoLy2G4pW
 vS9hQ5ZdQ3U0auBO7WmGXo9qMf82WCQCS2VaMUXaXTA+bd2Q2mUUZkDWVpzQpVwaC
 933YeW21EfHfmqnpcpBWtMXlYgAdvu+9/tnOOwTd73otLU5IFbEHsKhcljXCCu9d8
 iIeC87L9l+/DSc+xx4j18B8X0QQOsWRUdVeI1gnDoxPC7ymNuYNhKihvFHZGGabsW
 rOv9ov/6/O3Um7hPbKocwhXmrikGd7raV9Km0iBLilbySEiOahCvG5xeVkEPnhkFr
 uKlAAQxqjGOAPDO0JA==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N6bD0-1sf7zA2lcU-017xiA; Sun, 12
 May 2024 20:10:34 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <86frunyr3o.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 12 May
 2024 18:42:03 +0300")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
 <87r0e7oyct.fsf@HIDDEN> <86frunyr3o.fsf@HIDDEN>
Date: Sun, 12 May 2024 20:11:17 +0200
Message-ID: <87h6f2q4sa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:AAYl8Gl8F4EwHg29sz0d/tPRki8eY203coNXytzDXd/sNSEIa7N
 +tE+uRDF8HAh4V07n40bgCls2uLNKzOIxhN2PSEngFtAyw5C6YeRNpAo6xTDyoaSiSndnZu
 YYqgRFJ5wjgc7ogwieJDS8+AiQtnMSTNIE/eAHh+Upj/cvzlG2U9q/a9vvaH2FcZ4NafsDk
 pO0gEkAT2fUGOOBx9PTNw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:2B6vi+qyM4s=;AiXkD6WDdZ8CC8QGFxefj6ZT00m
 tJoAeIHbvGzLHQBlV3m6lu8GWsymmTKcLE4a/c9fwweg5+SvshraBYCRxIQutNjXeg5HZnX+5
 P0cRp73W3ByDCLkJAwfin6TsaIJJvNEEukR+rb9jifb05XpDDrXnWLtjgligK82jyuyq5YFya
 6tstpnTi5lveIBxRtKOvo/BkqoRMZUqzyACWLq0tqNQk/sHRzzOx+MKwSRDJqifBoS4CsR+g+
 s0RoQTOo+/NCCO+1ofilUZX6ml8Es10y8honfeLla+clMN2cpwWKFt9T2sqLlnnTVx4OlVpm7
 xVH7x8zCM+RfVYKRA3sO4ae1xOVY+GhWNV8rP0ryIW7h+J7LwS+aTniHMm+MylQD5pWSjJA3C
 uNYO9u1yE9dyNnHjvFAiUnMM8e5xf50Gdxdg0XIpgTULjv91LAWb1iz3nvH+nmNgcHpGscWsr
 QoyfOiR+hNpQJEroIOLDfxGcP9Fkn+iYHcm8OHEn03zCT2UgvOszTTy3IgXxnvCm7shnsrHrA
 KX4V84Y1Xn2NM4FBe8ubeA8C23LV/6CGMwSdVFhWq6w45FYnA4umuQ3JrYgvJelZ0AftXz0Xg
 anvsnJXyhjn1fR563OQd+aVe5SnWlrqDp/TJ+0L30Tv9CNJcAIyR1agSS+iEfWF3bAz/UCGeS
 HPpcshcMvwGEtiYJIiKdQS68Xw0jNkfplky8w/DRGBvKUgj2wDf/Fvuydp1/vbuegP6yPmxqS
 MkaWnNTWrk4lhXZ+BEa46wjJXQAJA532R2VRVhxXh3CY9sYu0lqs6tk7V6OfK/X49KoI45q8q
 IanLVVHJHL61SNVDoZHDXvK8+19mHmto5Pde+UXFayuWA=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: Stefan Monnier <monnier@HIDDEN>, 70868 <at> debbugs.gnu.org,
 iarchivedmywholelife@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

> > Yes - but independent of that I think we want to switch printing using
> > `prin1'.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-lisp-emacs-lisp-pp.el-pp-insert-lisp-Always-print-wi.patch
Content-Transfer-Encoding: quoted-printable

=46rom 3024833e9557e2400a83f0e71b474c35d927260d Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Sun, 12 May 2024 19:55:30 +0200
Subject: [PATCH 1/2] * lisp/emacs-lisp/pp.el (pp--insert-lisp): Always pri=
nt
 with prin1

This fixes an aspect of Bug#70868.
=2D--
 lisp/emacs-lisp/pp.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 47805d3dbde..f24b0d55520 100644
=2D-- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -494,16 +494,12 @@ pp--insert-lisp
             (prin1 sexp (current-buffer)))))
     ;; 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))))
+     (let ((print-integers-as-characters (<=3D ?0 sexp ?z)))
+       (prin1 sexp (current-buffer))))
     (string
      (let ((print-escape-newlines t))
        (prin1 sexp (current-buffer))))
-    (symbol
-     (prin1 sexp (current-buffer)))
-    (otherwise (princ sexp (current-buffer)))))
+    (otherwise (prin1 sexp (current-buffer)))))

 (defun pp--format-vector (sexp)
   (insert "[")
=2D-
2.39.2


--=-=-=
Content-Type: text/plain


And while we talk about these lines:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0002-Don-t-try-to-pretty-print-non-lists-as-binding-list.patch
Content-Transfer-Encoding: quoted-printable

=46rom d9c32c4bce32838fbe44a0f8bfb4ed04b34d65f7 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Sun, 12 May 2024 19:58:14 +0200
Subject: [PATCH 2/2] Don't try to pretty print non-lists as binding list

* lisp/emacs-lisp/pp.el (pp--format-definition): Avoid barfing for SEXPs
like (let X Y) in `pcase' forms: ensure that what we try to print as
a list of bindings actually has an appropriate format.
=2D--
 lisp/emacs-lisp/pp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index f24b0d55520..aae3d2f78bf 100644
=2D-- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -576,7 +576,8 @@ pp--format-definition
     (unless (consp edebug)
       (setq edebug nil))
     (if (and (consp (car edebug))
-             (eq (caar edebug) '&rest))
+             (eq (caar edebug) '&rest)
+             (proper-list-p (car sexp)))
         (pp--insert-binding (pop sexp))
       (if (null (car sexp))
           (insert "()")
=2D-
2.39.2


--=-=-=
Content-Type: text/plain



> That will probably come with problems of its own...

Unless it's clear: keep in mind that we only speak about atomic objects
here (no sequences) - this helper function is only intended for simple
objects like characters.

Also note that - unless I'm missing some aspect - printing with `princ'
instead of `prin1' will either produce the same result or a broken
result that cannot be `read' - and the function makes the promise to
print code.


Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 15:42:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 11:42:13 2024
Received: from localhost ([127.0.0.1]:55064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6BL3-0002Dq-EG
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 11:42:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s6BL2-0002Dj-4v
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 11:42:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s6BKv-0006Jm-Oh; Sun, 12 May 2024 11:42:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=i9D5I5yTdM7gpmtcTYAzMY3ZY2drjDWqUMA5R949bNo=; b=kvaT49yzFg0c
 L12ldMp1UpdFldcB98IHQvtrHsvVUFCHVujYmAKiN4X8fRA5RUMlMqwVXzXyJT70tUm61vNqMnrAv
 U77G15gnlMuhd3X3nEzZNRknl82ou54x1vIIKms4+DwrlxvgJ8jJ7rxWkKjqgjFDQzlNwIOFZaX7n
 GqeT4AIFhYXcPiSJmx196ZLzKG+Ra9SLwYwC4i5fLgbP1mkTT0v7VeitlWU5Eq41dwldtQZQfYlKY
 8knyfR2Q782jisYZ5KtjjNbgL5aa0601PRUwXr1RR0D6DYF3ARoPvNcxmICXXUZv3j8MGgLtUhkyP
 VrS2hrc5GJRVWq7NMGxMAA==;
Date: Sun, 12 May 2024 18:42:03 +0300
Message-Id: <86frunyr3o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <87r0e7oyct.fsf@HIDDEN> (message from Michael Heerdegen on Sun,
 12 May 2024 17:15:30 +0200)
Subject: Re: bug#70868: 30.0.50;
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN> <87r0e7oyct.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: iarchivedmywholelife@HIDDEN,  70868 <at> debbugs.gnu.org
> Date: Sun, 12 May 2024 17:15:30 +0200
> 
> > If you are talking about the bug with 59, then Mattias suggested to
> > exempt the semi-colon from the "display-small-numbers-as-characters"
> > feature.
> 
> Yes - but independent of that I think we want to switch printing using
> `prin1'.

That will probably come with problems of its own...

Stefan, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 15:14:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 11:14:57 2024
Received: from localhost ([127.0.0.1]:54917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6Aue-0001vJ-Mw
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 11:14:56 -0400
Received: from mout.web.de ([212.227.15.4]:38547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6Aub-0001v6-R7
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 11:14:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715526887; x=1716131687;
 i=michael_heerdegen@HIDDEN;
 bh=pZqfCYEdWW6IkF9GjqunUEP29NlBwrJyOgtbm2WtWOk=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=hchIZE63qgI5qsgNM521MR+QFroraXQwT8U3tsILuWUZj2Hg1Qayg40CfXOT54A2
 aiWmpIrabfPQdXnyuFxT0BVeOZg0Wox5u2+hAcmaKcEIPTz8d8QkBL9NWpKD0Cl9I
 MSt0HKkZxHtUE6Q56q2apG8ONfnvNQKHUc6w/AuH1dvBG4SgPQj4v/G8lCOnRwDJ6
 vWzmgOQ+aG7eExj4K8w3LGloWcZmS1MY7+IUdbiqcFEIezLahjruT3ksN7yUduuH1
 Bqpp81lzckg/y3Na9vHSyAT5zNBElObqMcSZfQJdGkp5odo5zHPDoNforVCrGoeva
 KRLS/k3vNYNPvkyQZg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M43GO-1s6AuV0lY8-00ATl9; Sun, 12
 May 2024 17:14:47 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <86ikzjysrh.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 12 May
 2024 18:06:10 +0300")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
 <87v83jozi7.fsf@HIDDEN> <86ikzjysrh.fsf@HIDDEN>
Date: Sun, 12 May 2024 17:15:30 +0200
Message-ID: <87r0e7oyct.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:JwoeeCQpFqWrxbFZf2ixurWXc/D0DJ49F5QYw6zi1CelkUwUnom
 uqufZcJZVZhWKKM16mNQsrpHcqW0lMSgOB85N9tDKOVQKncMigAbmyS3sakhlEeDX6IttwW
 O07nFWYBcos0L8XMdQ8+a00btGvm2+BuPyel9bhxkQpOIk0snaMLyTaGH/BEFjqwgSJ9LcB
 gGIUO1c07kQxYJ5kPitBw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:2S72CvOYmQw=;naIpQSnJQtZmOI8fx3lst9HN/ng
 SSOgpMBYhHzipF8YB5Jy/3MFrwhXm/Jvti0O6UGUBHR83EEFiYc7vVmsz+m5+NhD/ebf3mGDQ
 iEOQicwKzSGJWqOAlQcoxAjdYoYKHGlsRvFiZ5EFyXpuT1OxEYjjJdc7SXwV5bTqmWHJSkUhQ
 DmENsAKNYIri2lT89ZjLdXzaU72caHP7RCbiMJCNzeDbQk6fVC2y5z3ZYBR79Cd1Q3lH1Hjd+
 tErYex3B5A6FCrYFJtGxbhaMONbC34gTzZEVcTCTV03sOpgPRrwlLOd6VycjnXm0mqqmR8SA8
 B6hKodoBrpoZibToQOGIAtGDzs5ChMDKs3/q9oPFzErDIUwMd5v0YYqAxU4S0M7MDvxFEDlcm
 gX6MxuzkThQ3jFaRhTZmRFbAhcVTUQJBPpHP0tLlps48iePY7ZwnFnGTb7QSeLRdEPhvpJGsT
 LYhYrMPXpyfXQy0U6oc0zlolE6UDoIkOJGo3qkzfucy7pcxSly0wmonPW3FOZozNJVbIo2DOM
 YKy+whHUb/LWAB2Gb+HY4MdboKjE4wlEVfU+kpV88yAQKrIbVl5icv3lod3eveNI4CzHJwgQF
 p+PRCltV8WlxOYF+EorTneCUc9gvF6nBnKgLXpPwWyKpu2iKXJH5MP8NAlrq2QfjAj5QCIYyO
 nE7N/5DTv4Uzz10N914Fh5wqTZNSsY2G2OVyyDwPBrnr+Y4j42dIUu64BA4fkj+O8Y3qTXtQI
 DACQJAp8WWxOJvgcuExImiKwb/qJYbXgeYRaxLi00JxlQYMmMZko5VbZrxLhFmpWWg/OviohB
 UQSA4HiuaP1bJ1y4bjdnaMn/4pVtKwWy3T0d/j/Mj8HVw=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> I think if we want a Lisp formatter that is free of these issues, we
> need to implement a bona-fide formatter, which reindents and reformats
> Lisp code without actually 'read'ing and interpreting it.

+1

> > We should still fix this bug, obviously.
>
> If you are talking about the bug with 59, then Mattias suggested to
> exempt the semi-colon from the "display-small-numbers-as-characters"
> feature.

Yes - but independent of that I think we want to switch printing using
`prin1'.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 15:06:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 11:06:21 2024
Received: from localhost ([127.0.0.1]:54868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6AmL-0001ms-0U
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 11:06:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s6AmI-0001ma-7M
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 11:06:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s6AmC-0006ZP-F7; Sun, 12 May 2024 11:06:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=G2p8YW8m/ToY4TM357WW4antAphAa33lXhRf8jEObPE=; b=XOYq2N5VKjJD
 ewkkdGGWJY79ymxavG8PGjdds7S+Stn/LfvzIZVuGC5IuJsYpztQ3A2QNZ89SDA1oYvuDxLiI+dsq
 3FCSAhLelOJSvh5n/N6n/7UBHUm3lMhhfR5ulFRHoic+lHcn/RnqyLl31P28Zjzwas3C8on5F8Z5I
 pe0AtN9fBx9ijlbQt5J0oTi3+oQ8Cp4q8oSohWKg7XUEVUpEOqvAMaFyGKZzQkOfaKMBo3xbHIgMO
 JIIFIWjKSTOigXsdQBw+sNIcDdReMZZLCyX8PClUW7wdtvsZ1xZuFfmZStQBEK9tk6g2jMpAf12+b
 8Sb1f3HPxAgxaDMDGh6Ajw==;
Date: Sun, 12 May 2024 18:06:10 +0300
Message-Id: <86ikzjysrh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87v83jozi7.fsf@HIDDEN> (message from Michael Heerdegen on Sun,
 12 May 2024 16:50:40 +0200)
Subject: Re: bug#70868: 30.0.50;
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN> <87v83jozi7.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: iarchivedmywholelife@HIDDEN,  70868 <at> debbugs.gnu.org
> Date: Sun, 12 May 2024 16:50:40 +0200
> 
> So, my opinion is that Elisp pretty printing with input expressions, in
> contrast to text, is, if at all, only useful for automatically generated
> expressions (like macro expansions).

I think if we want a Lisp formatter that is free of these issues, we
need to implement a bona-fide formatter, which reindents and reformats
Lisp code without actually 'read'ing and interpreting it.

> We should still fix this bug, obviously.

If you are talking about the bug with 59, then Mattias suggested to
exempt the semi-colon from the "display-small-numbers-as-characters"
feature.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 12 May 2024 14:50:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 10:50:07 2024
Received: from localhost ([127.0.0.1]:54791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6AWd-0001cS-53
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 10:50:07 -0400
Received: from mout.web.de ([212.227.17.11]:59125)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s6AWZ-0001bs-O9
 for 70868 <at> debbugs.gnu.org; Sun, 12 May 2024 10:50:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715525396; x=1716130196;
 i=michael_heerdegen@HIDDEN;
 bh=ten0tI0ySD7FZmiwNnIe95BWbA4EwiIzCG2SgOfqNQI=;
 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=fyKKZuumzARibSfpcvW0qH85eaoZ+A/QLvIWnWMlOaInYmobxpV6RiLA8HfBJWbw
 MyyyI1n39jLOXuczQ8pUjwA0YeaGmP0w3UaA8NXLB/sfwmtESQSOL9gTYCfxlw5uh
 HPkVuPL2V3t6I+WIeWTS6rMaJqIUixJwT7X98uxqrBrqZU4juRz16kEPfhkzqPano
 AyNAMOdeJBe+G1Vyxp4z6q1TT6TMyIeHrgTXnSXXsuHKBC0btCOzjTVIC/9kNIjAv
 VqwFn4AtHsN0OWI0YiVQoaGAUtBhd0GhDPFCdWsHnwL0/LexK0svpOi4KufmxNZbf
 fIc+Wvm6aiT2H0hjnw==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MLAVc-1rp37037DO-00IF2r; Sun, 12
 May 2024 16:49:56 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <86h6f419mi.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 11 May
 2024 21:33:41 +0300")
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN> <86h6f419mi.fsf@HIDDEN>
Date: Sun, 12 May 2024 16:50:40 +0200
Message-ID: <87v83jozi7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:rGWz4eoD5dQb4z6Incl6Ea+DkPgfJsPzMKptu0/f2QF2O1C1U51
 JbBEZAmrGTFfMoZdepzb9DY3tIhpY9dqIqA8LGX/EsksmNwfz5Mh+G8WAyUAA7B+J6LIBkT
 XffYTcOb223SvTGlyijjpj4e8IoP1PS2zkgMq9p3EHgDdgvHgGii+f6j5dcsZ6f1H76fd0S
 o0JAy56GphN8WzHaegAkQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:yOoFRpoeuNA=;IIQrG+41MNTYeboR9DWrq5X5aGt
 GQtooA0TKmVvoMAW9bM9vdvOTP0omh8zGm0Ym8XNkCD475J+YwgT8jh7Y86LMWpGwuzNKD58S
 WRlhRtcnPbIBd04ek8x+/NfbssO190m5ni9RBEZahMris7TBelpa2fEOKln2pVD33bw9/YPQX
 /dWvQbo/Pf2dHo8mWQ4KADHdBoc3cUmIPiM52eRXb0VORkIz6VRrxLbHgiI2qNYPPeLQtnqxN
 W7tK0m7hJ6dNcb9Yw7pRmPRgzhF3AgzPU8+TFwPhlfF80EqkmHtb1BT+yLgQbO2dHiDrmDZqb
 yM3vK6UrIKqGTTRkWj07ShTZij3pOp/6pZL0eEbgcR1Yps+7PznaqIFACl8VlMbK8phEWeN/+
 lYb26pCyoa4aYBwOJ8HuayZW9hJASFD7MtJdANMz/H8dC38XIOv/QHHI8/yali9ypG44QTxMN
 o5a3vdH7Htlm0E+t63CIc4P6pGSqVJjSekh7A3cb6N9/ACx+0kcmE5meDbSq/k2H1vkfk4rny
 chqQDOi+/LivA4Nntu/1mZAw73pIkzDFkRIeElrFgvtmriFMkx85Z7c2Sn/oWsBB0CZ/P/WMn
 NofzCL0qu/JTpfEfncuYsuf05WRlzFTsLwKMOeSOn2aDjey6FRqFOY47OzRij+M50H31zrxzl
 yboGTqJBiF8W8BNmNOALvrfg6L0eA3vDP1hCiCJb76u2pLbCSZzKy5t51PXXEjhcTfi8KfYEp
 c3uudUa5wLQ8pqmGWNe3gsjkEteg2ZTmqxGJNB5Bj4KKNtV8fu3OKoPZtsU3sljjEFBj0z0n3
 SHSAmxANOG2ZJ0OfBy/N/Z6ZlxG1DVPy/s1Qc7repyics=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>   M-: (pp-emacs-lisp-code '((quote a))) RET
>     =3D> ('a)

Another one is nil vs. () or '() vs. 'nil, like in

  (defun f () ...)  vs.  (defun f nil ...)

or

  (delq nil my-list) vs. (delq () my-list)

etc, then - when to use dot syntax? - there is
`(foo . (,b)) vs. `(foo ,b) or

(let ((my-alist '((a . (1 2)) (b . (3 4))))) ...) vs.
(let ((my-alist '((a 1 2))    (b 3 4))) ...)

then (list +1 -1) vs. (list 1 -1), ?c vs. n vs ?\x... vs. ?\N...,
then there is "\n" vs "
" (docstrings!!!) - there is a ton of such ambiguities!

And note that we have only brought up silly one-line code examples so
far.  In real code, what the user expects will be _different_ for
different places in one and the same larger expression.

I totally agree that this problem is surprising and APITA, but please
don't expect that `pp-emacs-lisp-code' will ever produce satisfying
results when fed with existing code written by humans (i.e., when we
`read' and reprint it).  This will mess up as much as it prettifies, and
more.

And note there are even more problems of other kinds.  Another one is
that we don't discriminate context dependent semantics.  Is (let ...) a
`let' expression?  Or a `let' `pcase' form?  Or a list of names of
special forms?  Or maybe something which is meant to be macroexpanded to
a `let' expression, and the second element of the list is not a binding
list but something like ,(compute-let-bindings)?


I know these kinds of problems well and for years from my experience
with my "el-search" package - when I first tried an automatic rewriting
rule like

   `(if ,cond ,form) --> `(when ,cond ,form)

I was very disappointed about how ugly everything got when all in FORM
got folded to syntactical defaults.

[ For completion, if anyone wonders: in "el-search" I try to identify
the code parts that get part of the replacement expression - COND and
FORM in the above example - in the original code in the buffer operated
on and reuse the print syntax from there. ]


In sum I'm quite sure that

  M-: (pp--insert-lisp 'my-large-thunk-of-real-life-code)

is something that will never produce really good looking code whatever
guessing and heuristical cleverness we might be able to invent.  It will
always produce a result that a human will have to tune and correct
manually line by line.  Which is actually exactly the work we wanted to
delegate to this function!


So, my opinion is that Elisp pretty printing with input expressions, in
contrast to text, is, if at all, only useful for automatically generated
expressions (like macro expansions).  It's trivial that this will come
with the same problems (though in this case they are a bit less
surprising and annoying at least).  We should still fix this bug,
obviously.


Michael.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 18:33:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 14:33:52 2024
Received: from localhost ([127.0.0.1]:49891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5rXc-0004oq-Ec
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 14:33:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48744)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s5rXa-0004ok-4h
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 14:33:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s5rXT-0007J2-RF; Sat, 11 May 2024 14:33:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=78kqQCcn9ZYbwuwlg5fDfxoDMKliNb5mSgtXca8G2K8=; b=IPB87Fl/Jj2W
 VxCSshg4+8bx/MGN4zdS9jtIhZt4JssoXiItwGC9gbaPd+dS0tmTp89rwaiqwZR0ngt7D1+y7x83S
 gs6uPfs6BPhK9NKeHPYxVnAKRwNhTa5bxAMGuPkPiym1AtlPROSWJfTj8O0AvZYkIOJ8tZt+vGxAp
 ZGJAG/kTFu6ME4Aw4hrhZM7Isnl9KUcOdtRewYGPib7VHCyJFk16MM4Bal3fT0cNDFtGW/p/4vmn0
 jH/QANrMuEpNU7laEMXuO5akXBmoGhZaNs5vXfqUoUImHq/0DUSouinaDQNfIK2Xmj3JS4MJeaNDw
 oB8CAWxh9iAvto3jfjwNPA==;
Date: Sat, 11 May 2024 21:33:41 +0300
Message-Id: <86h6f419mi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: iarchivedmywholelife@HIDDEN
In-Reply-To: <86jzk019u0.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 11
 May 2024 21:29:11 +0300)
Subject: Re: bug#70868: 30.0.50;
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
 <86jzk019u0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: michael_heerdegen@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: michael_heerdegen@HIDDEN, 70868 <at> debbugs.gnu.org
> Date: Sat, 11 May 2024 21:29:11 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Date: Sat, 11 May 2024 14:26:07 -0400
> > From: iarchivedmywholelife <iarchivedmywholelife@HIDDEN>
> > Cc: 70868 <at> debbugs.gnu.org
> > 
> > I would expect/want no conversion in either case.
> 
> Then you are basically talking about a very different implementation.
> As long as the implementation 'read's the SEXP argument, you cannot
> expect no conversion.

Here's a very simple example, unrelated to numbers vs characters:

  M-: (pp-emacs-lisp-code '((quote a))) RET
    => ('a)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 18:29:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 14:29:22 2024
Received: from localhost ([127.0.0.1]:49869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5rTF-0004lG-Ob
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 14:29:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45836)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s5rTE-0004l8-08
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 14:29:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s5rT8-0005sX-Vk; Sat, 11 May 2024 14:29:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=zQwf9Q0BconMKMCAXQt91jlRQ18qHLHkiWuZHivv+ks=; b=E5oniFSdUT7m
 7sSq05SSPYJptqZ1uHJkngIzmm0e6kOB8tIr9OVlgWgmMy9Pf1rjb38dhZcTHTBGMCkJSGkbZPdms
 q7KORWn84PUyls3wd04y2nOHrS4pfaRfzC/ho3lkyjhQkTGJbTl3vxhnVfDHIIygiu1BRBSVH/IQd
 Rr2HsJwDVO51g5eiOMNT+Npyia8MakQnNe6EuerZFfitImwS+vrKK3OcxmqtVOfiQl9JmZducyDz0
 KvlDKaqKUucU6hyss++lowCXcflhgZRiaFkXx6MSGts1qE63ep7vjGMJ3iRwGAoU1vGH9qwKJJktt
 yjE6nS/colcHooBlIMIFRA==;
Date: Sat, 11 May 2024 21:29:11 +0300
Message-Id: <86jzk019u0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: iarchivedmywholelife <iarchivedmywholelife@HIDDEN>
In-Reply-To: <663fb841.050a0220.ffcbb.b84f@HIDDEN> (message from
 iarchivedmywholelife on Sat, 11 May 2024 14:26:07 -0400)
Subject: Re: bug#70868: 30.0.50;
References: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: michael_heerdegen@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 11 May 2024 14:26:07 -0400
> From: iarchivedmywholelife <iarchivedmywholelife@HIDDEN>
> Cc: 70868 <at> debbugs.gnu.org
> 
> I would expect/want no conversion in either case.

Then you are basically talking about a very different implementation.
As long as the implementation 'read's the SEXP argument, you cannot
expect no conversion.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 18:27:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 14:27:18 2024
Received: from localhost ([127.0.0.1]:49852 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5rRF-0004jT-SE
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 14:27:18 -0400
Received: from mail-oo1-f48.google.com ([209.85.161.48]:59504)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iarchivedmywholelife@HIDDEN>) id 1s5rRD-0004jN-4Z
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 14:27:15 -0400
Received: by mail-oo1-f48.google.com with SMTP id
 006d021491bc7-5b2735f217aso1574140eaf.2
 for <70868 <at> debbugs.gnu.org>; Sat, 11 May 2024 11:27:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715451970; x=1716056770; darn=debbugs.gnu.org;
 h=mime-version:cc:to:from:importance:in-reply-to:subject:date
 :savedfromemail:message-id:from:to:cc:subject:date:message-id
 :reply-to; bh=heMUKmsCjHlZenxI4H8xS/HEOFtIjvWuElt8fTfsg28=;
 b=e+HhDsWww3p8d/+aTLA7+/DnTWTxURDgANqhsdSgE/7xzlsC/VvejDLnEHOEHz9cBT
 SbFdThY0h4ynMg0cexmX/7/Xx5RQdZ3NcNOgKwjkFtnHZLe1Rj3uVmbPdLP9VpgOdXGT
 qhur72IrhmpzDrA+Hy2vK5AR/cG6kiJtSWWosiXE2t1vfWyLykH/4dq13u9wYuIe0TUD
 heexWpBV5t0QmYl1ZuP0zY8/4gLB/PzuCFp712YCDXvQiOfLsPkqXVL7csZtjZvO6a63
 aTEsLvjNFF/PF0HGdQbANvlrmmObJF+YMOFqUyDRMksg4O1FE/Oa14MBKUEFhL57FkRe
 TTRQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715451970; x=1716056770;
 h=mime-version:cc:to:from:importance:in-reply-to:subject:date
 :savedfromemail:message-id:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=heMUKmsCjHlZenxI4H8xS/HEOFtIjvWuElt8fTfsg28=;
 b=uDB0WTZ4DLso4msQsZzrkboIpSpUxS0qIoe2YFk8psRkSwiRrde9g9Fv9C2BRDZqye
 rHr8Ki7pnbigVV6n8Pq9qyAKirxfi9vEr/RoAvAsZ0d/3wdffRwpMd5M2mmPBwwhfm9G
 qH9Uv6WfYT6mZ5p9eofL4X3sqShMHwLreQgs0in4iGIk8M6Sbo/hnQpcRzzV7ooxMmFq
 +7OF6WZAzxOEhu2yp9reglMVMoyEEETp1mmo2PbWfkHoxeFHo+P+jz6WcbWTNa/NsBwQ
 GV4POTIGYLi9TeCq1FSB+piROpL0Bw2bCMlefSoFbxRdEHSOpV43ze/TCv0Yt3vPCrGY
 QiKA==
X-Gm-Message-State: AOJu0YxWGW0NM91klbaWdzZ0+0lVSre2bg58Ds2yk4gPJ9RcqfvGxoSW
 vGbWubfXIvNduM2ciI989niuDudQWGqNhNiVzYeXyGiUFtqkClQtOSi+Nw==
X-Google-Smtp-Source: AGHT+IH8Pd87aGHqniDCwKiUY79UDBHuDHpnGLrvfynHrZ21orFGK9eZGUk6zzUIB9JlcicD37CLcA==
X-Received: by 2002:a05:6870:13d4:b0:233:5557:c6a2 with SMTP id
 586e51a60fabf-24172c4da6dmr7344275fac.34.1715451969750; 
 Sat, 11 May 2024 11:26:09 -0700 (PDT)
Received: from ?IPv6:2607:fb91:e5c:86a7:ad2:a257:e1f3:3d3d?
 ([2607:fb91:e5c:86a7:ad2:a257:e1f3:3d3d])
 by smtp.gmail.com with ESMTPSA id
 d75a77b69052e-43df5506fbbsm35755331cf.41.2024.05.11.11.26.08
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 11 May 2024 11:26:09 -0700 (PDT)
Message-ID: <663fb841.050a0220.ffcbb.b84f@HIDDEN>
SavedFromEmail: iarchivedmywholelife@HIDDEN
Date: Sat, 11 May 2024 14:26:07 -0400
Subject: Re: bug#70868: 30.0.50;
In-Reply-To: <86plts1ej2.fsf@HIDDEN>
Importance: normal
From: iarchivedmywholelife <iarchivedmywholelife@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Michael Heerdegen <michael_heerdegen@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--_com.samsung.android.email_1070720628370230"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

----_com.samsung.android.email_1070720628370230
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

SSB3b3VsZCBleHBlY3Qvd2FudCBubyBjb252ZXJzaW9uIGluIGVpdGhlciBjYXNlLiBNYXliZSBp
bnN0ZWFkIG9mIHByaW50aW5nIGJhc2VkIHB1cmVseSBvZmYgdHlwZSB3ZSBjYW4gc2VlIHdoYXQg
aG93IHRoZSBkYXRhIHdhcyByZXByZXNlbnRlZCBhbmQgZGVsZWdhdGUgYmFzZWQgb2ZmIHRoYXQu
wqAKLS0tLS0tLS0gT3JpZ2luYWwgbWVzc2FnZSAtLS0tLS0tLUZyb206IEVsaSBaYXJldHNraWkg
PGVsaXpAZ251Lm9yZz4gRGF0ZTogNS8xMS8yNCAgMTI6NDcgUE0gIChHTVQtMDU6MDApIFRvOiBN
aWNoYWVsIEhlZXJkZWdlbiA8bWljaGFlbF9oZWVyZGVnZW5Ad2ViLmRlPiBDYzogNzA4NjhAZGVi
YnVncy5nbnUub3JnLCBpYXJjaGl2ZWRteXdob2xlbGlmZUBnbWFpbC5jb20gU3ViamVjdDogUmU6
IGJ1ZyM3MDg2ODogMzAuMC41MDsgPiBDYzogaWFyY2hpdmVkbXl3aG9sZWxpZmVAZ21haWwuY29t
PiBEYXRlOiBTYXQsIDExIE1heSAyMDI0IDE4OjM4OjQ4ICswMjAwPiBGcm9tOsKgIE1pY2hhZWwg
SGVlcmRlZ2VuIHZpYSAiQnVnIHJlcG9ydHMgZm9yIEdOVSBFbWFjcyw+wqAgdGhlIFN3aXNzIGFy
bXkga25pZmUgb2YgdGV4dCBlZGl0b3JzIiA8YnVnLWdudS1lbWFjc0BnbnUub3JnPj4gPiA+IEFu
eXdheSwgYWRkaW5nIGEgdXNlciBvcHRpb24gd2lsbCBwcm9iYWJseSBiZSB0aGUgYmVzdCBzb2x1
dGlvbiB3ZSBjYW4+ID4gaW1wbGVtZW50Lj4gPiBXZSBhbHJlYWR5IGhhdmUgYHByaW50LWludGVn
ZXJzLWFzLWNoYXJhY3RlcnMnLCB0aG91Z2guwqAgU28gaWYgd2Ugd2FudCB0bz4gbWFrZSB0aGlz
IGNvbXBsZXRlbHkgY29udHJvbGxhYmxlIG9uIHRoZSBwZXIgdXNhZ2UgYmFzaXMsIHJlbW92aW5n
IHRob3NlPiBsaW5lcyB3b3VsZCBpbmRlZWQgbWFrZSBtb3JlIHNlbnNlLsKgIFRoZW4gdGhlIHVz
ZXIgY291bGQganVzdCBiaW5kPiBgcHJpbnQtaW50ZWdlcnMtYXMtY2hhcmFjdGVycycgYXMgZm9y
IGFueSBvdGhlciBwcmludGluZyBhY3Rpb24uVGhlIGlzc3VlIGhlcmUgaXMgdXNlciBleHBlY3Rh
dGlvbnMgZnJvbSB3aGF0IEVtYWNzIGRvZXMgYnkgZGVmYXVsdC5UbyBzZWUgd2hhdCBJIG1lYW4s
IHJlbW92ZSB0aG9zZSBsaW5lcywgYW5kIHRoZW4gdHJ5wqAgTS06IChwcC1lbWFjcy1saXNwLWNv
ZGUgJyhlcSBmb28gP2EpKSBSRVRFdmlkZW50bHksIHRoZXJlIGFyZSB0d28gc2lkZXMgdG8gdGhp
cyBjb2luLg==

----_com.samsung.android.email_1070720628370230
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64

PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0
L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPjwvaGVhZD48Ym9keSBkaXI9ImF1dG8iPkkgd291bGQgZXhw
ZWN0L3dhbnQgbm8gY29udmVyc2lvbiBpbiBlaXRoZXIgY2FzZS4gTWF5YmUgaW5zdGVhZCBvZiBw
cmludGluZyBiYXNlZCBwdXJlbHkgb2ZmIHR5cGUgd2UgY2FuIHNlZSB3aGF0IGhvdyB0aGUgZGF0
YSB3YXMgcmVwcmVzZW50ZWQgYW5kIGRlbGVnYXRlIGJhc2VkIG9mZiB0aGF0LiZuYnNwOzxkaXY+
PGJyPjwvZGl2PjxkaXYgYWxpZ249ImxlZnQiIGRpcj0iYXV0byIgc3R5bGU9ImZvbnQtc2l6ZTox
MDAlO2NvbG9yOiMwMDAwMDAiPjxkaXY+LS0tLS0tLS0gT3JpZ2luYWwgbWVzc2FnZSAtLS0tLS0t
LTwvZGl2PjxkaXY+RnJvbTogRWxpIFphcmV0c2tpaSAmbHQ7ZWxpekBnbnUub3JnJmd0OyA8L2Rp
dj48ZGl2PkRhdGU6IDUvMTEvMjQgIDEyOjQ3IFBNICAoR01ULTA1OjAwKSA8L2Rpdj48ZGl2PlRv
OiBNaWNoYWVsIEhlZXJkZWdlbiAmbHQ7bWljaGFlbF9oZWVyZGVnZW5Ad2ViLmRlJmd0OyA8L2Rp
dj48ZGl2PkNjOiA3MDg2OEBkZWJidWdzLmdudS5vcmcsIGlhcmNoaXZlZG15d2hvbGVsaWZlQGdt
YWlsLmNvbSA8L2Rpdj48ZGl2PlN1YmplY3Q6IFJlOiBidWcjNzA4Njg6IDMwLjAuNTA7IDwvZGl2
PjxkaXY+PGJyPjwvZGl2PjwvZGl2PiZndDsgQ2M6IGlhcmNoaXZlZG15d2hvbGVsaWZlQGdtYWls
LmNvbTxicj4mZ3Q7IERhdGU6IFNhdCwgMTEgTWF5IDIwMjQgMTg6Mzg6NDggKzAyMDA8YnI+Jmd0
OyBGcm9tOiZuYnNwOyBNaWNoYWVsIEhlZXJkZWdlbiB2aWEgIkJ1ZyByZXBvcnRzIGZvciBHTlUg
RW1hY3MsPGJyPiZndDsmbmJzcDsgdGhlIFN3aXNzIGFybXkga25pZmUgb2YgdGV4dCBlZGl0b3Jz
IiAmbHQ7YnVnLWdudS1lbWFjc0BnbnUub3JnJmd0Ozxicj4mZ3Q7IDxicj4mZ3Q7ICZndDsgQW55
d2F5LCBhZGRpbmcgYSB1c2VyIG9wdGlvbiB3aWxsIHByb2JhYmx5IGJlIHRoZSBiZXN0IHNvbHV0
aW9uIHdlIGNhbjxicj4mZ3Q7ICZndDsgaW1wbGVtZW50Ljxicj4mZ3Q7IDxicj4mZ3Q7IFdlIGFs
cmVhZHkgaGF2ZSBgcHJpbnQtaW50ZWdlcnMtYXMtY2hhcmFjdGVycycsIHRob3VnaC4mbmJzcDsg
U28gaWYgd2Ugd2FudCB0bzxicj4mZ3Q7IG1ha2UgdGhpcyBjb21wbGV0ZWx5IGNvbnRyb2xsYWJs
ZSBvbiB0aGUgcGVyIHVzYWdlIGJhc2lzLCByZW1vdmluZyB0aG9zZTxicj4mZ3Q7IGxpbmVzIHdv
dWxkIGluZGVlZCBtYWtlIG1vcmUgc2Vuc2UuJm5ic3A7IFRoZW4gdGhlIHVzZXIgY291bGQganVz
dCBiaW5kPGJyPiZndDsgYHByaW50LWludGVnZXJzLWFzLWNoYXJhY3RlcnMnIGFzIGZvciBhbnkg
b3RoZXIgcHJpbnRpbmcgYWN0aW9uLjxicj48YnI+VGhlIGlzc3VlIGhlcmUgaXMgdXNlciBleHBl
Y3RhdGlvbnMgZnJvbSB3aGF0IEVtYWNzIGRvZXMgYnkgZGVmYXVsdC48YnI+VG8gc2VlIHdoYXQg
SSBtZWFuLCByZW1vdmUgdGhvc2UgbGluZXMsIGFuZCB0aGVuIHRyeTxicj48YnI+Jm5ic3A7IE0t
OiAocHAtZW1hY3MtbGlzcC1jb2RlICcoZXEgZm9vID9hKSkgUkVUPGJyPjxicj5FdmlkZW50bHks
IHRoZXJlIGFyZSB0d28gc2lkZXMgdG8gdGhpcyBjb2luLjxicj48L2JvZHk+PC9odG1sPg==

----_com.samsung.android.email_1070720628370230--





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 16:47:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 12:47:57 2024
Received: from localhost ([127.0.0.1]:49230 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5pt7-0000ja-M9
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 12:47:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59180)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s5pt4-0000jS-0g
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 12:47:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s5psz-0001ur-1Q; Sat, 11 May 2024 12:47:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=ftFtsbXxzzmXcH8/+bymvByvXLYgJKSkQPNFpHeH8LA=; b=l0OhnOLwODAf
 lGgkespLfdw5XQMdKjjEsIgnJS27sFpwVPbhPfiInKc4id846M8bc3Rko7LLtX6JDJUbN7IQui0ad
 Xgd38OVa1MKVkg0+MBbDmvrMkcvAOjcRxfx8pvtxRbtHpPp4e1xsaPG4OjYKSJr2nCakzCUse36Sq
 gWlT7shrm0AENS70JlFXS4Ne1ZSZT0+ELls6ANRNZbWclKZfabH4XGUMklShR55n+M/lhSamSgcJj
 6GtWAxlFvO0IW/Gs9NlRnp0PIc7KgflLdthOo6CzLRCb4ATZqFjpgDC55cZBZyqTUGbJ4qavpuLMq
 x6a0syecpHaOYhx2xYV95Q==;
Date: Sat, 11 May 2024 19:47:45 +0300
Message-Id: <86plts1ej2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87ikzk717r.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#70868: 30.0.50;
 pp--insert-lisp prints small integers as characters
References: <87ikzl8bmj.fsf@HIDDEN> <87pltsboug.fsf@HIDDEN>
 <87ikzk717r.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: iarchivedmywholelife@HIDDEN
> Date: Sat, 11 May 2024 18:38:48 +0200
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> > Anyway, adding a user option will probably be the best solution we can
> > implement.
> 
> We already have `print-integers-as-characters', though.  So if we want to
> make this completely controllable on the per usage basis, removing those
> lines would indeed make more sense.  Then the user could just bind
> `print-integers-as-characters' as for any other printing action.

The issue here is user expectations from what Emacs does by default.
To see what I mean, remove those lines, and then try

  M-: (pp-emacs-lisp-code '(eq foo ?a)) RET

Evidently, there are two sides to this coin.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 16:38:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 12:38:13 2024
Received: from localhost ([127.0.0.1]:49150 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5pjg-0000cZ-LV
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 12:38:12 -0400
Received: from mout.web.de ([217.72.192.78]:60315)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5pje-0000cT-E0
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 12:38:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715445484; x=1716050284;
 i=michael_heerdegen@HIDDEN;
 bh=tQYiRLfC+5rauync4OvcxVgkrIak8EMAfEYAWYKgqlg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=suH3Gf4GLY/xnGMdr3I7Ftztta3+ahClblA8aB6i25be1NWenOlGfhhdomVnqYal
 AzlLsVSc3JFxHtuXvG/KSd9K0cPcJjOPE80KsEADI6jEkWRC45KyxbalUIoID0qi1
 dgQKSXKqPSbKVRjbJL+zIExdVPJezWf7fPRQGB8V7i/a68vHldZNmaKw1IO+Wzruu
 wOCtZSAWuWsAOe1XQoP9S2wrR3OQW1g7Qn0YUaBWN7N3RLi7uYw1UXzZBb7P9J4yD
 uMTPK8Q29D118GmuTRqml2mx3sKVUvUme7DU8C8zqEmkC2/1r1AbCRZbVKx4d4ziV
 pg4m9Yy2U09yma6D2g==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MUUAM-1sEjfQ1PSy-00QWX9; Sat, 11
 May 2024 18:38:04 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87pltsboug.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:54:47 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <87pltsboug.fsf@HIDDEN>
Date: Sat, 11 May 2024 18:38:48 +0200
Message-ID: <87ikzk717r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:GhspXzxixu56O3w1RPzDhg//6KSyKHE/VK7e+6DrHFmKy8S0YO3
 vklMjogQ664k2JULUVQ47JaehjIxGD1GMTi4PDFPbAXMj5NgwWhycYMVhVHVsH6w5ANWIo2
 VWDdBJABtUlPqGfIpfnJsim/kRGhugqH4qJ56h/98plpcEVPnkygTDdB150e1KrrUi7CNTM
 jHiQuWjLSIvdAxjTSkSOw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:xbk38h+v/40=;08UtFddpQ39tPWoSCEczBhUNZ9w
 Q0xJFxsjXje4hc4DMmPIeGLmtfPdlklK+/+UyRt3atFjYkhGVzvpqcffkK2DWGqRTx4/8o5U/
 mK1jRWETaTfMKFxVd058Hex6vtf3tuVZRmEgaIifogr5yhY66gjM9vY+QhBrNzuWxGYInZrmj
 TJCxdx9wWhLgtGUR09WvrIuGws2Vny6jqOHZTTAooytS56cW/wRt82l8bFBaW0Uj31QzljXrf
 7JNn8FphAfSduWGlbNuxl+lyJdtlWIsDJKg9EAfSzAv8bJltsmKiOXOuLMaIaLlV/SmU3NSC9
 B0iK4r16kYl298skSpP4GDCLIHb/mFJOWpMLpCAuUikC1CkOrIbj/mS+SdrYE/8x1OMuxbG3y
 GJIepPdaD0dCZFAsBDuHdz6+JOIQXmUXhhy9/agdUHrpI0L3kEZn9pn4OY4GlrYbkGIrLUgPV
 L/fB+370GJw+ani+4M9KjYpoqjxWxaesqEtntZjb98R5CbH9HE37XrjGaAD06QBZLLz/9YhrE
 W+405q9mCzw/8FrtjpKcsq3azOADB4sihaj8O5NEQkm3/w+Uwgo0pHNyMGoGPcXL9xr5l/xmL
 qEJ1K75sOPFB4W9KaNJtHcQ4U7sZRLU1ZSHMBcF4z06OHtMxdvFhipGQbI8kbFJ+zAS99XKG5
 6hen4MtaBqlxd6OAG+VIBVBvDb2WjWNwqLBf8yNrzVSPtft3xHdL1sCvhn8OKiykB8ObH82om
 tr439RFQxkjSqeXRC5aBf014lhP8mfbhBukY85YYr5F/GT2OxTiS1Rm7xuipme2wOTBrBNobP
 uSePsliXi+3vnVugzVCevs0oKjn8TDZDP/cE9zJCTZ8I8=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@HIDDEN> writes:

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

We already have `print-integers-as-characters', though.  So if we want to
make this completely controllable on the per usage basis, removing those
lines would indeed make more sense.  Then the user could just bind
`print-integers-as-characters' as for any other printing action.


Another thought: In a lot of cases the user specifies code in an already
printed form - either at a (e.g. the M-:) prompt as a function argument,
or the code is present in a buffer or file.  And the user just wants to
have it prettified.  Then we `read' it, losing all syntactical
distinctions and redundancies, and guess what syntax might be
appropriate although we just threw that information away.

Doing it differently would mean to write something new that would
operate on strings or buffer text instead of printing expressions.
AFAIR, some the pp functions already do that but on a very simple level
(like adding newlines and indentation).


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2024 16:38:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 12:38:21 2024
Received: from localhost ([127.0.0.1]:49154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5pjp-0000cm-0d
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 12:38:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:36786)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5pjn-0000cg-RU
 for submit <at> debbugs.gnu.org; Sat, 11 May 2024 12:38:20 -0400
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 <michael_heerdegen@HIDDEN>)
 id 1s5pjl-0005RL-Ey
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 12:38:17 -0400
Received: from mout.web.de ([217.72.192.78])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1s5pji-0008Hn-Ip
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 12:38:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715445484; x=1716050284;
 i=michael_heerdegen@HIDDEN;
 bh=tQYiRLfC+5rauync4OvcxVgkrIak8EMAfEYAWYKgqlg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=suH3Gf4GLY/xnGMdr3I7Ftztta3+ahClblA8aB6i25be1NWenOlGfhhdomVnqYal
 AzlLsVSc3JFxHtuXvG/KSd9K0cPcJjOPE80KsEADI6jEkWRC45KyxbalUIoID0qi1
 dgQKSXKqPSbKVRjbJL+zIExdVPJezWf7fPRQGB8V7i/a68vHldZNmaKw1IO+Wzruu
 wOCtZSAWuWsAOe1XQoP9S2wrR3OQW1g7Qn0YUaBWN7N3RLi7uYw1UXzZBb7P9J4yD
 uMTPK8Q29D118GmuTRqml2mx3sKVUvUme7DU8C8zqEmkC2/1r1AbCRZbVKx4d4ziV
 pg4m9Yy2U09yma6D2g==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MUUAM-1sEjfQ1PSy-00QWX9; Sat, 11
 May 2024 18:38:04 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87pltsboug.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:54:47 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <87pltsboug.fsf@HIDDEN>
Date: Sat, 11 May 2024 18:38:48 +0200
Message-ID: <87ikzk717r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:GhspXzxixu56O3w1RPzDhg//6KSyKHE/VK7e+6DrHFmKy8S0YO3
 vklMjogQ664k2JULUVQ47JaehjIxGD1GMTi4PDFPbAXMj5NgwWhycYMVhVHVsH6w5ANWIo2
 VWDdBJABtUlPqGfIpfnJsim/kRGhugqH4qJ56h/98plpcEVPnkygTDdB150e1KrrUi7CNTM
 jHiQuWjLSIvdAxjTSkSOw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:xbk38h+v/40=;08UtFddpQ39tPWoSCEczBhUNZ9w
 Q0xJFxsjXje4hc4DMmPIeGLmtfPdlklK+/+UyRt3atFjYkhGVzvpqcffkK2DWGqRTx4/8o5U/
 mK1jRWETaTfMKFxVd058Hex6vtf3tuVZRmEgaIifogr5yhY66gjM9vY+QhBrNzuWxGYInZrmj
 TJCxdx9wWhLgtGUR09WvrIuGws2Vny6jqOHZTTAooytS56cW/wRt82l8bFBaW0Uj31QzljXrf
 7JNn8FphAfSduWGlbNuxl+lyJdtlWIsDJKg9EAfSzAv8bJltsmKiOXOuLMaIaLlV/SmU3NSC9
 B0iK4r16kYl298skSpP4GDCLIHb/mFJOWpMLpCAuUikC1CkOrIbj/mS+SdrYE/8x1OMuxbG3y
 GJIepPdaD0dCZFAsBDuHdz6+JOIQXmUXhhy9/agdUHrpI0L3kEZn9pn4OY4GlrYbkGIrLUgPV
 L/fB+370GJw+ani+4M9KjYpoqjxWxaesqEtntZjb98R5CbH9HE37XrjGaAD06QBZLLz/9YhrE
 W+405q9mCzw/8FrtjpKcsq3azOADB4sihaj8O5NEQkm3/w+Uwgo0pHNyMGoGPcXL9xr5l/xmL
 qEJ1K75sOPFB4W9KaNJtHcQ4U7sZRLU1ZSHMBcF4z06OHtMxdvFhipGQbI8kbFJ+zAS99XKG5
 6hen4MtaBqlxd6OAG+VIBVBvDb2WjWNwqLBf8yNrzVSPtft3xHdL1sCvhn8OKiykB8ObH82om
 tr439RFQxkjSqeXRC5aBf014lhP8mfbhBukY85YYr5F/GT2OxTiS1Rm7xuipme2wOTBrBNobP
 uSePsliXi+3vnVugzVCevs0oKjn8TDZDP/cE9zJCTZ8I8=
Received-SPF: pass client-ip=217.72.192.78;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@HIDDEN> writes:

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

We already have `print-integers-as-characters', though.  So if we want to
make this completely controllable on the per usage basis, removing those
lines would indeed make more sense.  Then the user could just bind
`print-integers-as-characters' as for any other printing action.


Another thought: In a lot of cases the user specifies code in an already
printed form - either at a (e.g. the M-:) prompt as a function argument,
or the code is present in a buffer or file.  And the user just wants to
have it prettified.  Then we `read' it, losing all syntactical
distinctions and redundancies, and guess what syntax might be
appropriate although we just threw that information away.

Doing it differently would mean to write something new that would
operate on strings or buffer text instead of printing expressions.
AFAIR, some the pp functions already do that but on a very simple level
(like adding newlines and indentation).


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 15:12:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 11:12:09 2024
Received: from localhost ([127.0.0.1]:48805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5oOP-0008I0-4r
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 11:12:09 -0400
Received: from mail-lj1-f169.google.com ([209.85.208.169]:57715)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1s5oOM-0008Hh-Pi
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 11:12:07 -0400
Received: by mail-lj1-f169.google.com with SMTP id
 38308e7fff4ca-2e3fa13f018so35978761fa.3
 for <70868 <at> debbugs.gnu.org>; Sat, 11 May 2024 08:12:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715440261; x=1716045061; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject
 :date:message-id:reply-to;
 bh=bKK+QHbSz5Xsbip8aDqf1lBsXZBWwQZEpsixbW2CwVg=;
 b=H+Z8HtxH0pA/WpePMuHFhUaobroBknY1/fJ8aoX2TR3DHMTrDSCA8wX/VfV66PuCjg
 TbraOvpStFjmD4k7e1JqUrlBUDj83T8jeNCwo1/RRkjf8cnJWAa4x/aRhg7oI95Ft3Pb
 fVc3pBcBTQRzYYsfwOTIrPzcVf6aulAPeRAhnnLTe0bkbifanLDOto1XU7GL7zv6mqrC
 3t5cC3pLX98zZo8aizVqG0UCDTPNDMH8iX+j8zBz9pzqH0Z5SWro8jihPDNqibquaDpc
 ONYmAdVneocxk2+NLhrMnU4clGtq009991b8WwKuvjbGRfEzOoKhj/AGmfYFXulbuZkK
 hWbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715440261; x=1716045061;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=bKK+QHbSz5Xsbip8aDqf1lBsXZBWwQZEpsixbW2CwVg=;
 b=QR0D1rE0zNBF2BXjTl4neZRbs1UgRmmZJz/9nHf+i7U4ji5d/klgJUHTnxOKGwSt33
 n847IpGdwNf1hop/FnveC5QuPIr9isAgw7PSIBCaw4QExKXE9KXL2lXZr9q9bdggRSB7
 J9pkYzhyDl7xXWsGJQwj9HMsO9FW47XLJ4KYsh/CP/knZwy3upj6Us/1VP27b4QxSRiJ
 Z6lcmYn4qlbZUatRxHINqI+YTjCvk36WxKHzU08tAqyhNcVAAG4cJlAEqN+ItHEVeU5A
 DnhO6LGQWR1NjySMnSKePLebGbD60kvqSFRwmF+6+op9/qvletSjqDNMNLiWjVpaQHbk
 dUZg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWXb629MnpL48Fo3qTvlyccOGw6N+imncfjfGjSWuttWVnnvaOZbRHQ+XVwbxmjhGuY9pMr8Y4iKpUSD6hoQWAbsOgyez4=
X-Gm-Message-State: AOJu0Yz73fpY3S8uQANWYDrIaI7Y0z1xye9cJNh5m9nnJp/dbntt8jhf
 uTkCDYusqPuJ7cz3gKEUHnJ3RCgFlSkQWSk2ZD45UoKQnBqYSosw
X-Google-Smtp-Source: AGHT+IHTm59WqomJYSJ6NIZqhGRh/tI5V3CxWvcmEiYA+X6IIupvZi0fO88liECNg5C7PxyfsjDxIg==
X-Received: by 2002:a05:651c:2208:b0:2e5:67a8:2e5a with SMTP id
 38308e7fff4ca-2e567a8332emr18268341fa.13.1715440261084; 
 Sat, 11 May 2024 08:11:01 -0700 (PDT)
Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se.
 [80.217.1.132]) by smtp.gmail.com with ESMTPSA id
 38308e7fff4ca-2e4d18332edsm8170571fa.131.2024.05.11.08.11.00
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 11 May 2024 08:11:00 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87msow76ba.fsf@HIDDEN>
Date: Sat, 11 May 2024 17:10:59 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <45E16DC0-6BAD-4560-8418-CD7B40020D07@HIDDEN>
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN> <87h6f4bo5b.fsf@HIDDEN>
 <E2209579-0458-4FE1-8457-1CD96E963966@HIDDEN> <87msow76ba.fsf@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

11 maj 2024 kl. 16.48 skrev Michael Heerdegen =
<michael_heerdegen@HIDDEN>:

> Does anyone have a clue if there is a reason why we should not simply
> change _all_ occurrences of `princ' to `prin1' in `pp--insert-lisp' =
and
> related functions?

Those in `pp--insert-lisp` should probably be `prin1`. (Don't change the =
one in `pp`.)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 14:48:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 10:48:14 2024
Received: from localhost ([127.0.0.1]:48715 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5o1F-00081d-Rn
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 10:48:14 -0400
Received: from mout.web.de ([212.227.17.11]:42361)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5o1D-00081X-1X
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 10:48:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715438877; x=1716043677;
 i=michael_heerdegen@HIDDEN;
 bh=Cwp0rDp5qF//x8I8dIzzmF2f3TieXDxUkQwG60EV8NY=;
 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=boVJuJ1vy/9Ch3UuC3xK4bLTvSrfjzxtbUDv/ssjmFno0pzm4c1q2AZMO4HOQHPE
 RI8JoQkWYzVWJB3q2+qR5miy9TPTfBQO0ukXFwd/nX1Ef7SsFQnffsiUTCLCSNyEr
 mNN73hQqATPrkOlH/2qZfzu/Qjc7VT7snDWtW+6rpweQ5nYjuO34hGC1cI0+6ReDF
 2Qb1LcgVb7XS280NUfbH6T9EVd801+0QaJJjuwwSGMC+u10DKtM8GJnjzuishUc+n
 WZN8oozM7SbB3bOVRkmNl+N8wasBP+OxNwocV9/vJgXiqkc8eUxNE5IwSc5xF+n50
 Se9BrfZuVxZoc+Bl9A==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N9cLf-1si0T22Gqj-00rKxG; Sat, 11
 May 2024 16:47:57 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <E2209579-0458-4FE1-8457-1CD96E963966@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 11 May 2024 14:08:35
 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN> <87h6f4bo5b.fsf@HIDDEN>
 <E2209579-0458-4FE1-8457-1CD96E963966@HIDDEN>
Date: Sat, 11 May 2024 16:48:41 +0200
Message-ID: <87msow76ba.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:bbKsoXTR/K8ZJJwomqLq1yZQBd7oXUlGVFgsezif8z6HOWg5bDM
 Vu9H+jfhIAafcIohbB9GDUR56D7cFISeXsxPMb+kyfYkr7X20jKkdhNB1SrFKeq8OwsBwNn
 TMSGkBxFhrFvEjc/LQqGZBMSyQ81dttgWhURHtsJK/owgXL68UZiKYsNtfxDVFxrsAPlw88
 CsEkJfd+v8R8j7ONNHxWg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:FeGvPM+LEi4=;A5w52fY6J6v6SGDEo6iKk+1joyh
 oFeO6Ycw98fOpsbbOw0eD537+bVvwTTmR/cptE6zW4eRGM7vO4BZ0wnbHaF9EJxH9l60vcSNL
 pwjLIWQqs02BxRPET2oWWxKKJr0yvSEJreSzvx4ycmcBv+xh/rtomfDhUgk25tVOFslU+88JX
 0Ujt741tQO1oTDD9WffJRur60QyksgFgx+xbfyeDr/Ma/9wh8Qn3Xn3ly5GsPJyDGyIN1tUlf
 /ALyrykMRrh3E3fy/eEEi4vljf1jsLDRAo+c7dRgIF2rVoFuFNbBDzFm40l4eIeirolacm4+1
 RIQ57B/9ygmRdjxopc7RstmpL9U985oI/gpvkiP3SA/XcIIwJdpXzD6LkZCLKMvALT+R4Z4At
 2PKg+DPsUBScR5MTwQAQp04aB07z2+ueeo7ncTUhBwMZ409aX7xPAMZyD4MVe4zh4Wp7Yzmql
 x4smSCsatJgane0h08XgWKDGaqhtf+miNpHfanP7qp3qF+F4fOSUps3jgxRG0bHskIFPIIWjP
 LagUAMv7bTf6nCza5kJeLI2OzRKCkJ0TdsezqQsm7FuN2pa+pBnFO5/nqpfwRdcGKRGB5ZAjZ
 ylD9C81UG2/q8QinKf1cPU7xpNlzVC0IDBHAGrQCwCRTvgNC95VfQX3zna+CBH5hfKK7C1r4v
 6WDoJOBv7jys1p0Skvo8+9wIDO9dlIelC+IcDhP8CiYehjFlINcFP1E4UvJyTV2guMSlFmMb0
 PdPzYQnXgdjMVYz0jF1EcONnCuzbRM3U8lc/Kq5yXXWt0oKacrtJb5K6RmOQ4cXdIpik+HdeH
 W/jjOrnI4eWJsUncp8B54KrN6VvlbC0xvJUvO+CLzgmMA=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> 11 maj 2024 kl. 13.09 skrev Michael Heerdegen <michael_heerdegen@HIDDEN>:
>
> > (let ((print-integers-as-characters t))
> >   (princ ?\; (current-buffer)))
> >=20
> > prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> > `print-quoted' doesn't help.  This needs to be fixed.
>
> Does it? Not defending the code in any way, but `princ` isn't supposed
> to quote anything. If you want it in a form that can be read back in,
> use `prin1`.
>
> We do get to make up the rules, though. Perhaps it should print 57 as
> `;` instead of `?;`. It's not clear what makes the most sense here.

Thanks Andreas and Mattias for bringing up the missing point.

I don't have an opinion about - and don't want to answer - what `princ'
should print here, and rather stick to original problem of this bug
report.

It is quite obvious that we need to change `pp--insert-lisp' to use
`prin1' in this case - again: we changed several other places in the
past in the same way.

Does anyone have a clue if there is a reason why we should not simply
change _all_ occurrences of `princ' to `prin1' in `pp--insert-lisp' and
related functions?  It seems that when there is a difference we always
want `prin1', i.e. readable, printing.

BTW, is there a rule of thumb that makes it possible to remember which
of the two does the readable printing?  I'm always confusing them or
even don't get the problem.


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 12:09:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 08:09:43 2024
Received: from localhost ([127.0.0.1]:48017 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5lXr-00062a-CG
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 08:09:43 -0400
Received: from mail-lj1-f170.google.com ([209.85.208.170]:46364)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1s5lXq-00062U-2m
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 08:09:42 -0400
Received: by mail-lj1-f170.google.com with SMTP id
 38308e7fff4ca-2df83058d48so36303881fa.1
 for <70868 <at> debbugs.gnu.org>; Sat, 11 May 2024 05:09:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715429316; x=1716034116; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject
 :date:message-id:reply-to;
 bh=akmEEj0OIMU2jdGX62ySGp44HCUGZGDonqzFXJbzOAE=;
 b=kRqB2aCEI7XNf47iV+/bn5WoxMpaF1ZkpFBl5gIqLpmAWwqDFIsOVpmmQFVtN8dSfh
 mopb5CYq9NKwcaash9x8VhexUXpjo5jpmMEe2mK/Guu36gwG2lOJGaNMrajGuqU+BL7/
 wf08hlCXTHv4W7i4Zmato07/ugm8fms1TyLCP5zMEOGDf5jTeSfJ8p2yCDWB8HqKYCIW
 ghY+iXN4LGZlWKPbqVyIdCDlThE463c9pxk5MKB2OH514o/MDONqxEj2rczhWDWoPOHI
 2wmfPEwl9d/ifJWGv9+Nhjt+fO3k6vJ5cK8wVLl6fWXsHirbGhgs2vJHIbwONDFYcj1g
 3vtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715429316; x=1716034116;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=akmEEj0OIMU2jdGX62ySGp44HCUGZGDonqzFXJbzOAE=;
 b=hZvU3sKTtUFnDNFAyWwnfC84nNhmzHV1F2NzdsvNB+png6ujy13qbzNP71vh9xq7RN
 E4MVVnhNpW3yozSVqa4YD/XEBhcqaW9u5mvZichqxWnk4shb6BtDskX7sShN5XwI3Zi5
 o6v+Cw87Co1gYygPjZIHwk+lg+NwB282skUFiA802BJVXuGPD9ud1JRqJtjeUb3IsTNN
 Pu0TytMNLwt1pOS1F9RhPP3scem/5rQyKmxqFIV15EMLGFu9NLj/gVYR75W+VgHmYueB
 +cpPYccwKRizN2JcgWZnLTalPKTupZxAD0ZOdXGAtV621sOezL7nNQcLcSJWHbuqhRsp
 tVpw==
X-Gm-Message-State: AOJu0Yzj6FhCHQpZK+6o263Ktmv0hrSYgv8PjQcSgJQDWkJgcuk4Tt1W
 Hi5bO/qNyQvuEm3u74vc+dvnYgxxk/Fbo647gs5IKh1rY91wbg2q
X-Google-Smtp-Source: AGHT+IHfc+uzsmjtNkeIMwI3sPPq16OFIJ1NXA8EhkZEM2wiMw9aQLevAoKofRi2j/XPgVgkHf0IoQ==
X-Received: by 2002:a2e:93d7:0:b0:2e1:f38c:bd63 with SMTP id
 38308e7fff4ca-2e51fd46252mr32050671fa.15.1715429316339; 
 Sat, 11 May 2024 05:08:36 -0700 (PDT)
Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se.
 [80.217.1.132]) by smtp.gmail.com with ESMTPSA id
 38308e7fff4ca-2e4d16201f2sm7840361fa.117.2024.05.11.05.08.35
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 11 May 2024 05:08:36 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87h6f4bo5b.fsf@HIDDEN>
Date: Sat, 11 May 2024 14:08:35 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <E2209579-0458-4FE1-8457-1CD96E963966@HIDDEN>
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN> <87h6f4bo5b.fsf@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: iarchivedmywholelife@HIDDEN, 70868 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

11 maj 2024 kl. 13.09 skrev Michael Heerdegen =
<michael_heerdegen@HIDDEN>:

> (let ((print-integers-as-characters t))
>   (princ ?\; (current-buffer)))
>=20
> prints "?;" instead of "?\;" - it fails to quote the character.  =
Binding
> `print-quoted' doesn't help.  This needs to be fixed.

Does it? Not defending the code in any way, but `princ` isn't supposed =
to quote anything. If you want it in a form that can be read back in, =
use `prin1`.

We do get to make up the rules, though. Perhaps it should print 57 as =
`;` instead of `?;`. It's not clear what makes the most sense here.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 11:33:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 07:33:16 2024
Received: from localhost ([127.0.0.1]:47869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kyZ-0005iH-QY
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:33:16 -0400
Received: from mail-out.m-online.net ([212.18.0.10]:36800)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1s5kyX-0005iB-CZ
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 07:33:13 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4Vc3WK2xvzz1s953;
 Sat, 11 May 2024 13:32:13 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 4Vc3WJ6x7Gz1qqlS;
 Sat, 11 May 2024 13:32:12 +0200 (CEST)
X-Virus-Scanned: amavis at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024)
 with ESMTP id duCO0VSttC-y; Sat, 11 May 2024 13:32:12 +0200 (CEST)
X-Auth-Info: q3Ez7oe8Utc8fMjg162O7N/Q4sDveT8GGkWHtcA5Wxk7kxrkKChsK2XDuV0S34dr
Received: from igel.home (aftr-82-135-83-103.dynamic.mnet-online.de
 [82.135.83.103])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Sat, 11 May 2024 13:32:12 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id CB2AB2C02CE; Sat, 11 May 2024 13:32:11 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87le4gboof.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:58:24 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN>
X-Yow: And furthermore, my bowling average is unimpeachable!!!
Date: Sat, 11 May 2024 13:32:11 +0200
Message-ID: <87wmo0d1ok.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 70868
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

On Mai 11 2024, Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> A good catch!  59 is the character ;.  This is a bug in the printer:
>
> #+begin_src emacs-lisp
> (let ((print-integers-as-characters t))
>    (princ ?\; (current-buffer)))
> #+end_src
>
> prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> `print-quoted' doesn't help.  This needs to be fixed.

princ does not add any quoting, you need to use prin1 instead.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2024 11:32:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 07:32:22 2024
Received: from localhost ([127.0.0.1]:47861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kxi-0005hd-GQ
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:32:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:34792)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1s5kxg-0005hX-5V
 for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:32:20 -0400
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 <whitebox@HIDDEN>)
 id 1s5kxg-0004pC-Jl
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 07:32:20 -0400
Received: from mail-out.m-online.net ([212.18.0.10])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <whitebox@HIDDEN>)
 id 1s5kxe-0003CK-Ly
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 07:32:20 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4Vc3WK2xvzz1s953;
 Sat, 11 May 2024 13:32:13 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 4Vc3WJ6x7Gz1qqlS;
 Sat, 11 May 2024 13:32:12 +0200 (CEST)
X-Virus-Scanned: amavis at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024)
 with ESMTP id duCO0VSttC-y; Sat, 11 May 2024 13:32:12 +0200 (CEST)
X-Auth-Info: q3Ez7oe8Utc8fMjg162O7N/Q4sDveT8GGkWHtcA5Wxk7kxrkKChsK2XDuV0S34dr
Received: from igel.home (aftr-82-135-83-103.dynamic.mnet-online.de
 [82.135.83.103])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Sat, 11 May 2024 13:32:12 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id CB2AB2C02CE; Sat, 11 May 2024 13:32:11 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87le4gboof.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:58:24 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN>
X-Yow: And furthermore, my bowling average is unimpeachable!!!
Date: Sat, 11 May 2024 13:32:11 +0200
Message-ID: <87wmo0d1ok.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=212.18.0.10; envelope-from=whitebox@HIDDEN;
 helo=mail-out.m-online.net
X-Spam_score_int: -22
X-Spam_score: -2.3
X-Spam_bar: --
X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

On Mai 11 2024, Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> A good catch!  59 is the character ;.  This is a bug in the printer:
>
> #+begin_src emacs-lisp
> (let ((print-integers-as-characters t))
>    (princ ?\; (current-buffer)))
> #+end_src
>
> prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> `print-quoted' doesn't help.  This needs to be fixed.

princ does not add any quoting, you need to use prin1 instead.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 11:09:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 07:09:18 2024
Received: from localhost ([127.0.0.1]:47760 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kbN-0002ga-VT
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:09:18 -0400
Received: from mout.web.de ([212.227.17.12]:49829)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5kbL-0002gR-5A
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 07:09:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715425748; x=1716030548;
 i=michael_heerdegen@HIDDEN;
 bh=3beUEcal5qL1LxcCU3OK3w8XjgvqlXo12+kB34lCeqQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=l5xjRqlBGKfvRQds0pZ/skk1N5jIPODesdRXvM6MUJwf3kaHziCV6QmywAl/OL0Q
 FmTSihIh++WTfSdqwxDPzb6IJgo5vIvoT7qx0OfzIAxDlgwTogD2FGO9kJmzpdgD8
 7KRuRowBKA4A2xm+b4FmhfYwzDtjrzbR/JbJXhPPADJvKgAH2JcDtHtsktRfPf4DO
 AZyu7vRY9hEfzlAIZtRSqZB5m5amK7SiU+TOup0A1EmwSjehiomcrzmXUCptK6Gwe
 e635f7vcRhUT4d8Vh2xkpwTLeeqfAkv795lk41x45j0HHM9Olpe8sKvIywwmFY+39
 D/Jc2JJkOMnUZ8tsLQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mv3Yg-1swcCa3Hlo-00r1hm; Sat, 11
 May 2024 13:09:08 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87le4gboof.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:58:24 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN>
X-Debbugs-Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Date: Sat, 11 May 2024 13:09:52 +0200
Message-ID: <87h6f4bo5b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Mh/BX1yjxYFFqT4IseUoP6zX4SiX3NHOcQemyqqKTkxygf4QegM
 6t9F6Xiwe2FXZKa9CqgL7JZZ8ANsYcreMHTF45mwa7ylZdyxGVgvIuFhmJKHQMIoBEqaYuS
 SAthbPQyNh4pDj0h2X13tN92OdSTRSLR8vBjDyhsnmg4cv1A2vuzxLtgXgeMuQhcb93mjn9
 JYBhWGQJdUY02yThIZFpg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:4Wteet99L5s=;2uZZ652Uhf5u61XuJn9c+QklrWP
 O2ZugJSYMinAZgfX+ZNf2q+V7Icf/B2YldP2uQ38u5ZjMf/6fD9dECTkHLQEdc7IGeMlJEZSj
 pB6FRMCdBzZB4Bzd55rOeSQoXdnsnKSCOPAg/w1u6Z50tU6Yjt8MRjuRyKvnpucOO6kgzmJEn
 +myIy+Ae6KMo04xi9LXmFsyYsnC21q+PyjtAHithw8eFW3fTyqTtsUdElZg1/fbgZZWxReQeR
 3TkotH9CUZsB2jCzz64Rs7yBLUUb7fuSMSWC/MhEaonT4RccdpJZNWzkl9CPoZ4wq5TcWE6oZ
 LKM+wwW9jc6JATgXEO1TYjSu9MyiDokkAdSyXqUWL1TlzD/C2tUVAgZ3ZBEVSVRODyY7Hb9+m
 W54oDYML+9y1ycOBog8sUdfSP6nS8Fy6YaLBHsD0GffAh8izEKy3w5kqryauBwCcROG9DjIqE
 Wld/knJVFfB0G1NuuDkA1MJLs0rn5haoO4Fy0KHGV445db6m+FPcRK819sP+UuSwyyYVZcqWu
 l/gRAf/QYRa4DAuT6+KiL0epUYbJRuccPNvQ8VtJUBzODjU2lKbNHUSRlij1NJOul2+bPyfAR
 uoe9K8EnbBbpuUA5QCnJvE4qKXOEjDG4/Zw5pWgIHPrLtWrTvHZY34JVRTyY/uv7orzfRROdc
 kG/uP+P9jpJTEEmkkZDoPJCt5TYdVGAri6SvnXGBAgnY+QH/1ei+xc5sgd8uZrjrVIT93VXWG
 VJGHPHfWUSsnxVqYITOwJRuQ2B73GjNk5CpUJnz5yMeMaJHMx2e/THYI+e0mdoLv1QMklZeuA
 bddfHPkHQyhkJWwDuX6Nq2XoFuq1iyYk6dUPwD8EKj9mE=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70868
Cc: No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

I guess Mattias is the right one to CC for this problem.

> > $ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))'
> > Error: scan-error ("Unbalanced parentheses" 1 16)
> >  forward-sexp-default-function(1)
> >  forward-sexp(1)
> >  indent-sexp()
> >  pp-emacs-lisp-code((:comments 59))
> >  eval((pp-emacs-lisp-code `(:comments 59)) t)
> >  command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments   59))"))
> >  command-line()
> >  normal-top-level()
> > Scan error: "Unbalanced parentheses", 1, 16
>
> A good catch!  59 is the character ;.  This is a bug in the printer:
>
> #+begin_src emacs-lisp
> (let ((print-integers-as-characters t))
>    (princ ?\; (current-buffer)))
> #+end_src
>
> prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> `print-quoted' doesn't help.  This needs to be fixed.


Michael.




Information forwarded to mattiase@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2024 11:09:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 07:09:21 2024
Received: from localhost ([127.0.0.1]:47763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kbR-0002gn-DM
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:09:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:35094)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5kbP-0002gh-Bi
 for submit <at> debbugs.gnu.org; Sat, 11 May 2024 07:09:20 -0400
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 <michael_heerdegen@HIDDEN>)
 id 1s5kbP-0007B7-IB
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 07:09:19 -0400
Received: from mout.web.de ([212.227.17.12])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1s5kbO-00064m-3I
 for bug-gnu-emacs@HIDDEN; Sat, 11 May 2024 07:09:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715425748; x=1716030548;
 i=michael_heerdegen@HIDDEN;
 bh=3beUEcal5qL1LxcCU3OK3w8XjgvqlXo12+kB34lCeqQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=l5xjRqlBGKfvRQds0pZ/skk1N5jIPODesdRXvM6MUJwf3kaHziCV6QmywAl/OL0Q
 FmTSihIh++WTfSdqwxDPzb6IJgo5vIvoT7qx0OfzIAxDlgwTogD2FGO9kJmzpdgD8
 7KRuRowBKA4A2xm+b4FmhfYwzDtjrzbR/JbJXhPPADJvKgAH2JcDtHtsktRfPf4DO
 AZyu7vRY9hEfzlAIZtRSqZB5m5amK7SiU+TOup0A1EmwSjehiomcrzmXUCptK6Gwe
 e635f7vcRhUT4d8Vh2xkpwTLeeqfAkv795lk41x45j0HHM9Olpe8sKvIywwmFY+39
 D/Jc2JJkOMnUZ8tsLQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mv3Yg-1swcCa3Hlo-00r1hm; Sat, 11
 May 2024 13:09:08 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
 of text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87le4gboof.fsf@HIDDEN> (Michael Heerdegen via's message of "Sat, 
 11 May 2024 12:58:24 +0200")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
 <87le4gboof.fsf@HIDDEN>
X-Debbugs-Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Date: Sat, 11 May 2024 13:09:52 +0200
Message-ID: <87h6f4bo5b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Mh/BX1yjxYFFqT4IseUoP6zX4SiX3NHOcQemyqqKTkxygf4QegM
 6t9F6Xiwe2FXZKa9CqgL7JZZ8ANsYcreMHTF45mwa7ylZdyxGVgvIuFhmJKHQMIoBEqaYuS
 SAthbPQyNh4pDj0h2X13tN92OdSTRSLR8vBjDyhsnmg4cv1A2vuzxLtgXgeMuQhcb93mjn9
 JYBhWGQJdUY02yThIZFpg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:4Wteet99L5s=;2uZZ652Uhf5u61XuJn9c+QklrWP
 O2ZugJSYMinAZgfX+ZNf2q+V7Icf/B2YldP2uQ38u5ZjMf/6fD9dECTkHLQEdc7IGeMlJEZSj
 pB6FRMCdBzZB4Bzd55rOeSQoXdnsnKSCOPAg/w1u6Z50tU6Yjt8MRjuRyKvnpucOO6kgzmJEn
 +myIy+Ae6KMo04xi9LXmFsyYsnC21q+PyjtAHithw8eFW3fTyqTtsUdElZg1/fbgZZWxReQeR
 3TkotH9CUZsB2jCzz64Rs7yBLUUb7fuSMSWC/MhEaonT4RccdpJZNWzkl9CPoZ4wq5TcWE6oZ
 LKM+wwW9jc6JATgXEO1TYjSu9MyiDokkAdSyXqUWL1TlzD/C2tUVAgZ3ZBEVSVRODyY7Hb9+m
 W54oDYML+9y1ycOBog8sUdfSP6nS8Fy6YaLBHsD0GffAh8izEKy3w5kqryauBwCcROG9DjIqE
 Wld/knJVFfB0G1NuuDkA1MJLs0rn5haoO4Fy0KHGV445db6m+FPcRK819sP+UuSwyyYVZcqWu
 l/gRAf/QYRa4DAuT6+KiL0epUYbJRuccPNvQ8VtJUBzODjU2lKbNHUSRlij1NJOul2+bPyfAR
 uoe9K8EnbBbpuUA5QCnJvE4qKXOEjDG4/Zw5pWgIHPrLtWrTvHZY34JVRTyY/uv7orzfRROdc
 kG/uP+P9jpJTEEmkkZDoPJCt5TYdVGAri6SvnXGBAgnY+QH/1ei+xc5sgd8uZrjrVIT93VXWG
 VJGHPHfWUSsnxVqYITOwJRuQ2B73GjNk5CpUJnz5yMeMaJHMx2e/THYI+e0mdoLv1QMklZeuA
 bddfHPkHQyhkJWwDuX6Nq2XoFuq1iyYk6dUPwD8EKj9mE=
Received-SPF: pass client-ip=212.227.17.12;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: No Wayman <iarchivedmywholelife@HIDDEN>, 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

I guess Mattias is the right one to CC for this problem.

> > $ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))'
> > Error: scan-error ("Unbalanced parentheses" 1 16)
> >  forward-sexp-default-function(1)
> >  forward-sexp(1)
> >  indent-sexp()
> >  pp-emacs-lisp-code((:comments 59))
> >  eval((pp-emacs-lisp-code `(:comments 59)) t)
> >  command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments   59))"))
> >  command-line()
> >  normal-top-level()
> > Scan error: "Unbalanced parentheses", 1, 16
>
> A good catch!  59 is the character ;.  This is a bug in the printer:
>
> #+begin_src emacs-lisp
> (let ((print-integers-as-characters t))
>    (princ ?\; (current-buffer)))
> #+end_src
>
> prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> `print-quoted' doesn't help.  This needs to be fixed.


Michael.




Information forwarded to mattiase@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 10:57:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 06:57:47 2024
Received: from localhost ([127.0.0.1]:47714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kQF-0002WV-Li
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 06:57:47 -0400
Received: from mout.web.de ([217.72.192.78]:43921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5kQE-0002WP-4B
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 06:57:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1715425060; x=1716029860;
 i=michael_heerdegen@HIDDEN;
 bh=n9nQsxTddrmqUp9ffqXiwIZuczhvmkXJGqN/ovAxgpQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=YmpoU2DQNV/pEmJ2Wcdf/4FEdoXzBGDqoLThVcD8PNdlpneozZvyhdjtimpzadRv
 GMIiauNFcoTEYB3uwNBjLEYZNKGA5I5X+EuzsME9CqrneIpEopMBQkKrEFzrX6q9r
 Pigln4DeYBatZvUu0F21p20E83kBVTmeS9iwhj4IMjd5TJcA4eQG7/+5MaZk4TA3q
 opNjqXWg0QtDtuVMzHNs5y1j0lKW2yvyfZGMd2TIy4c9K1AVJ5qHAXYufdX/1pXvY
 1utk52odtUYw4unPt+fhIwsScwXZ/B6dkENibN80j5oclQWzq8qSdRLJiMXr80M+M
 kncWoSG+SYuWdvZNSg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N3Xjd-1sn1Kp0at1-010gXF; Sat, 11
 May 2024 12:57:40 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: No Wayman <iarchivedmywholelife@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <878r0h8ayk.fsf@HIDDEN> (No Wayman's message of "Fri, 10 May
 2024 20:10:43 -0400")
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
Date: Sat, 11 May 2024 12:58:24 +0200
Message-ID: <87le4gboof.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5pHjy2Vf/NwY4XhPZuFZWiepTXT/WxyTWE43IC3lDzdLBLmiIMo
 sk2Vve/R3vBt8ANhlL7zy/8BGzFHooKji/tZEu2v7zyUS/xeQfS2wa5nKv4TKdbGGHQAhqO
 RLpR13lTCIzJIw4uBXEUz08AjOaQ3zmIiDiYXjKqZqCSJC2BfxyfGEGiAIichtkuka1Pm3M
 GKyxTJ8Us8X5rn9Fuq8TA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:Ub3J4yWmsk4=;J73tsmY26R0NVkS3K5yKcOXYdHD
 k6Aha1ghX540lGQm6DJXshfq4naW1TOVrNHK848MwGk6uX7b38+1uFy4yYZzpAwb/9zfDaNLH
 3DsWYBxAM0bdq9yXv5lREtslu7x0nUnCtWuGZw2uIjCTAPhSoEuYzsXW5zy/HqtwS1iiQSjzX
 ua/tQcpbLY3vW9BCOqQ5ZjKmVmteFCJJKNAIlM61KzpTmE84hepAhUWJIHZuBNy49/YfhsI0t
 6ma4DcUYyJ0RFaspchzWk0L2bNrXn/ztiKPV+SxasJn379+FY63d6Q6xL6d8eWBG3GkokkiMQ
 caDVuExRFdMmXNpRvlcl/o8HkQ4bYmcOHnfcujy4VkcVIPZ1equWk8DFhCeC+jEykz3zFkDwB
 aHCKAkpATrx/KWuDIaSDKT5BF+3uC4Q0i/gCir2kyoFx+SMw/Pk59dymmxIcZRRpcGCtI7rid
 3xtMNZIkjHvocDfvm28hPyvbs8UeaFsjUD7OEIiIpmWwrScgIEHj4FddoUIeahr9DciSU7gl5
 54w1ljA5V/pfYnIwnpZ3iCrvfUxdjWe2KNO0VxDLVJ1eIUFERxagPy6t27QR6A+3XzAFFl3Cu
 WS5LNs3agfYzthCgCpJr4+aFvUipLwSHMeWUfzGdKTH9bCiJ22LI6xcL/BtPEYuq3rT+1VqDh
 Bd6NprfnaVwV+4FVCx1UaW7xjMMPNTc2woYTCdFSdahXR4EYSH4zchbI03QENCIk9puTeUmIr
 fhApuwb4uUlZweyIQ2fzLIkkmyZGC0ioobKiJmjcR1k6rN2YEj7qDXE337ZytxCovy+spQ/AS
 qfqZ2bjzH+/GsvaE4PTnQSJC0BJWBX7WyPmB/2zMABKWE=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

No Wayman <iarchivedmywholelife@HIDDEN> writes:

> $ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))'
> Error: scan-error ("Unbalanced parentheses" 1 16)
>  forward-sexp-default-function(1)
>  forward-sexp(1)
>  indent-sexp()
>  pp-emacs-lisp-code((:comments 59))
>  eval((pp-emacs-lisp-code `(:comments 59)) t)
>  command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments   59))"))
>  command-line()
>  normal-top-level()
> Scan error: "Unbalanced parentheses", 1, 16

A good catch!  59 is the character ;.  This is a bug in the printer:

#+begin_src emacs-lisp
(let ((print-integers-as-characters t))
   (princ ?\; (current-buffer)))
#+end_src

prints "?;" instead of "?\;" - it fails to quote the character.  Binding
`print-quoted' doesn't help.  This needs to be fixed.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 10:54:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 06:54:11 2024
Received: from localhost ([127.0.0.1]:47696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5kMl-0002TU-1Z
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 06:54:11 -0400
Received: from mout.web.de ([212.227.15.4]:53743)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1s5kMj-0002TK-0v
 for 70868 <at> 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@HIDDEN;
 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
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
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: No Wayman <iarchivedmywholelife@HIDDEN>
Subject: Re: bug#70868: 30.0.50; pp--insert-lisp prints small integers as
 characters
In-Reply-To: <87ikzl8bmj.fsf@HIDDEN> (No Wayman's message of "Fri, 10 May
 2024 19:56:20 -0400")
References: <87ikzl8bmj.fsf@HIDDEN>
Date: Sat, 11 May 2024 12:54:47 +0200
Message-ID: <87pltsboug.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:vEYmfhSwYqCTVZC2v3EM8sQiXXes1nZHOkxJOxsLEclKIqKn/Sd
 /ghd1v9X+MJPIe9rJ0LnYhSE8a/ljEUvwtzsR17KiAq+2SiHqUFbcrqohBlFqkIUcwuIL+P
 JU1pNf0EIqJmipsLKKs4qWX2OmHFawIVywNxEZhIH3wo6vUy4pzu02zaNMDq6JrKdFhup/4
 EClMEtIpVQcQ3+bg9yVtw==
X-Spam-Flag: NO
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/9Of97v3OVKECHYxc8NJ
 qeUZtx+V0bXsUrpx6q3OQidCuU5aRXJ8ooZHBKw/du/PY=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70868
Cc: 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

No Wayman <iarchivedmywholelife@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at 70868 <at> debbugs.gnu.org:


Received: (at 70868) by debbugs.gnu.org; 11 May 2024 06:47:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 02:47:47 2024
Received: from localhost ([127.0.0.1]:46597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5gWJ-0005dZ-HI
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 02:47:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36596)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s5gWH-0005dR-H4
 for 70868 <at> debbugs.gnu.org; Sat, 11 May 2024 02:47:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s5gWC-0007Pe-Bh; Sat, 11 May 2024 02:47:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=gMBQvVj6xGOm5oz5wZv7U5lwA+fRoRSxvQC5bFgxOiY=; b=CUYobaJaSHED
 V50M9bzlPO7qrZh2IQOyO2mAQG7U1V1/S25iFcBum2l8if/MRx5zP3apnHZvWLVr520zmL1G55S6N
 Czyyz2HI0A37K4nHgNI60yhRAfdxrUcT2G4PJW1yXHcD3TJQaTflMdkMiCT4+F7tTJVUGTxxlh9Ex
 ctm4ZKunVEPZTOQe74J/GkEgrd3WEMvYPF/6zEbEWIlr2uurWwpRMHRLE+w82r+BWCC+4stl66KsD
 jOJXJrsDZoAPmTYhM/H70Xdiu5Er0txZAdTq0GCeMYLGFgmJk4wPspPFqRICtm7LmUIFFbRc7aYUI
 cII3TMT7LaCSVZJoA9EvWw==;
Date: Sat, 11 May 2024 09:47:33 +0300
Message-Id: <86ttj43kvu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: No Wayman <iarchivedmywholelife@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <878r0h8ayk.fsf@HIDDEN> (message from No Wayman on Fri, 10 May
 2024 20:10:43 -0400)
Subject: Re: bug#70868: 30.0.50;
 pp--insert-lisp prints small integers as characters
References: <87ikzl8bmj.fsf@HIDDEN> <878r0h8ayk.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70868
Cc: 70868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: No Wayman <iarchivedmywholelife@HIDDEN>
> Date: Fri, 10 May 2024 20:10:43 -0400
> 
> No Wayman <iarchivedmywholelife@HIDDEN> writes:
> 
> > From the body of pp--insert-lisp in pp.el:
> >
> >
> > ```emacs-lisp
> > ;; Print some of the smaller integers as characters, perhaps?
> > (integer
> > (if (<= ?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.
> > Is it worth making configurable, or outright removing?
> 
> A side-effect that tilts me in favor of removing said behavior:
> 
> $ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))' 
> 
> Error: scan-error ("Unbalanced parentheses" 1 16)
>   forward-sexp-default-function(1)
>   forward-sexp(1)
>   indent-sexp()
>   pp-emacs-lisp-code((:comments 59))
>   eval((pp-emacs-lisp-code `(:comments 59)) t)
>   command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments 
>   59))"))
>   command-line()
>   normal-top-level()
> Scan error: "Unbalanced parentheses", 1, 16

Lars and Stefan, any comments?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2024 00:10:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 10 20:10:52 2024
Received: from localhost ([127.0.0.1]:44962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5aK5-0004TE-4y
	for submit <at> debbugs.gnu.org; Fri, 10 May 2024 20:10:52 -0400
Received: from lists.gnu.org ([209.51.188.17]:35140)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iarchivedmywholelife@HIDDEN>) id 1s5aK4-0004T8-BM
 for submit <at> debbugs.gnu.org; Fri, 10 May 2024 20:10:44 -0400
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 <iarchivedmywholelife@HIDDEN>)
 id 1s5aK4-0000Y7-ML
 for bug-gnu-emacs@HIDDEN; Fri, 10 May 2024 20:10:45 -0400
Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <iarchivedmywholelife@HIDDEN>)
 id 1s5aK2-0002Ix-Lx
 for bug-gnu-emacs@HIDDEN; Fri, 10 May 2024 20:10:43 -0400
Received: by mail-qt1-x833.google.com with SMTP id
 d75a77b69052e-43d4538b16fso8628871cf.2
 for <bug-gnu-emacs@HIDDEN>; Fri, 10 May 2024 17:10:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715386241; x=1715991041; darn=gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=PrOc29SoWFO+OfASVZ5Cafx94ZBLMHlVXfcdQMAbbF0=;
 b=abitNE29qiVbHc4REHaRT7Vmgo1h7o08htD0TjyaNQRejGSmxIH33pOCUYqZTnPItr
 2e9Lith0xVFOGdefZ2ItsKZWPVqRpnB7gdc8mYM+wwm8ZFGJiev4ZtxtR10ajPHQGJSd
 +Mvkf9LLf6Hoq1eUEDJPrv3jonI5WsxKanGEC4q1zboTbsq5z1d1lWlqzcvQTphwUWhE
 Y0F+UWh+Y97WNCv/v4MpVO7WfdE+sRUOD+hcOQHCpHqpTdXgopQYh9zahuxXdfHqnAaW
 NiSxD7WxitKHC5G1YpVdc0t5pwz+jwFm0pZqezrXrdyo/cQBjdzbL1mto122FufRUk35
 IGJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715386241; x=1715991041;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=PrOc29SoWFO+OfASVZ5Cafx94ZBLMHlVXfcdQMAbbF0=;
 b=sYTauYHGhWNrc64Ez72PdmeSdlq5xauYGssxarqPB8bQ7gwO6WD00/PtWDp98ClYm8
 JVZtNLwKFYrBKdfz6HdAOMVb+2DYA1fcHocPb/XyA+wzCQ7aPEe4WhoNaebBgRiRwA/D
 ZpdQQ4WpGvee0e7pS079zZWFLSB845q10Ve5TXvMc+dHRQoUh8HvVYcrO7gvnjzPfo4T
 CpWhlZHVUEq9MbpczJunGfkWkCmyDwEzy26ZblT6pDzv/CyNOgpx9tSBXTiZg62focIU
 o+2Ofpca+S+2U0G3O7Nf1YIpZxp+6zeteAeAkLaXcJ326CMoeZsD005Zx7BtDlptuQDV
 09jg==
X-Gm-Message-State: AOJu0YxlAHF/OitnfLktX7l/KNkrRpOK1Zm4mXp5zxoWVz8e8ixGVJ6r
 8vbrx2kuYmTawQsEuHHef+HZbLONOIT/D8aNaorG7NUQMV5b11wy3Q/Naw==
X-Google-Smtp-Source: AGHT+IH89HDIKlkwpTSaV7kKNEWEyPIdqZ9+jmyGOkD8ama9PZbPnWyrq9OKfZLJa5kZkDJ1m4LUhg==
X-Received: by 2002:a05:622a:1895:b0:43a:6988:bb80 with SMTP id
 d75a77b69052e-43dfdb07064mr50042761cf.11.1715386240944; 
 Fri, 10 May 2024 17:10:40 -0700 (PDT)
Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c])
 by smtp.gmail.com with ESMTPSA id
 d75a77b69052e-43df5521c21sm26681851cf.48.2024.05.10.17.10.40
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 10 May 2024 17:10:40 -0700 (PDT)
From: No Wayman <iarchivedmywholelife@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: 30.0.50; pp--insert-lisp prints small integers as characters
In-Reply-To: <87ikzl8bmj.fsf@HIDDEN> (No Wayman's message of "Fri, 10 May
 2024 19:56:20 -0400")
References: <87ikzl8bmj.fsf@HIDDEN>
Date: Fri, 10 May 2024 20:10:43 -0400
Message-ID: <878r0h8ayk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2607:f8b0:4864:20::833;
 envelope-from=iarchivedmywholelife@HIDDEN; helo=mail-qt1-x833.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

No Wayman <iarchivedmywholelife@HIDDEN> writes:

> From the body of pp--insert-lisp in pp.el:
>
>
> ```emacs-lisp
> ;; Print some of the smaller integers as characters, perhaps?
> (integer
> (if (<= ?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.
> Is it worth making configurable, or outright removing?

A side-effect that tilts me in favor of removing said behavior:

$ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))' 

Error: scan-error ("Unbalanced parentheses" 1 16)
  forward-sexp-default-function(1)
  forward-sexp(1)
  indent-sexp()
  pp-emacs-lisp-code((:comments 59))
  eval((pp-emacs-lisp-code `(:comments 59)) t)
  command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments 
  59))"))
  command-line()
  normal-top-level()
Scan error: "Unbalanced parentheses", 1, 16




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 May 2024 23:56:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 10 19:56:22 2024
Received: from localhost ([127.0.0.1]:44894 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5a6A-0004KU-9x
	for submit <at> debbugs.gnu.org; Fri, 10 May 2024 19:56:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:32842)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iarchivedmywholelife@HIDDEN>) id 1s5a68-0004KO-SS
 for submit <at> debbugs.gnu.org; Fri, 10 May 2024 19:56:21 -0400
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 <iarchivedmywholelife@HIDDEN>)
 id 1s5a69-0006ek-Ba
 for bug-gnu-emacs@HIDDEN; Fri, 10 May 2024 19:56:21 -0400
Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <iarchivedmywholelife@HIDDEN>)
 id 1s5a68-0006DW-1d
 for bug-gnu-emacs@HIDDEN; Fri, 10 May 2024 19:56:21 -0400
Received: by mail-qk1-x730.google.com with SMTP id
 af79cd13be357-792b8bca915so207652085a.2
 for <bug-gnu-emacs@HIDDEN>; Fri, 10 May 2024 16:56:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715385378; x=1715990178; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=c/IT3LPF9e5eevrBJI6MgrgSTJjLiwWNYGPisIdX4tI=;
 b=FOaI2iJfzd0FiK8lPPhViUhabLVeDNeMwEMhpXlB5ncaVhliaXAKYVwOyAzaLB/M70
 sUEo4F21om0EY6vHnR/Qf5ibhKHd3WcoT6GtDyYe69D9bG6UTb76Q88L1LjPAtG9NA03
 mdryhUTcrWy1QdarrZLvzKkNZXrpBgZ9wXFWRGwX1aIAx9/6V5Zpniqy4hTpaW2q1lN2
 wolG39FpdePlZUDozHzELdtOk5CTsvFTMp9vpyteN34bw7fkQMXplWPO/uWDuaM8Tf/p
 Cl1iW3OTL6kgPfTGKOifkMDobYWncwKkiybm3wsgyEyD1rONEoISHV3S0rej0aeU1qTO
 wfPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715385378; x=1715990178;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=c/IT3LPF9e5eevrBJI6MgrgSTJjLiwWNYGPisIdX4tI=;
 b=n4EcxNUHUkb/AtB97bD0Lxc/RBMvKIYOWn007VwpFnef2dbl16NoouErGGVFVk7eNO
 /450dq0Z4GqZlW+Qh9WhrDF0AVcQgc6kKVnMW+Y6uBPgA5aLgonhkI46y6EFwMfZTpjV
 B48+Gw4/ksb40s3kZI+dJmuV+CwN2wICezPeotEzL0nk49AUPcGn9Jvo5/NfWz0duf9v
 HO4ae8Tudx20mUiXC5mATNppg25PlO3lBx9H+aNDo1i4ELnzBYKkyyw5dFf7FjyVUdtr
 /OvHtR9aqfyOILuIrDecwS3BJ0sqy2jSJ7BSGijF5AE0CokLQlR1QtpMLJgrI236G5wY
 sdHw==
X-Gm-Message-State: AOJu0YwjgXJf3f7B4sg4yC/N96Iw1iSmDlMgjnMB2ymjSB2kdENqtRWx
 ol85aZLhoTqS/BE/qA9ofAtrpjLaCF6MZA1n53msTxok3RPSA5MQRghqbg==
X-Google-Smtp-Source: AGHT+IHqqAHebdfjh+z7mxT6O2jdQo/vtA17121pIk6/xcY4kWUIpzpzxPH3vWyTCryQkzbncv8mjQ==
X-Received: by 2002:a05:620a:568:b0:792:bd06:d5d with SMTP id
 af79cd13be357-792c7578f08mr396635785a.16.1715385378198; 
 Fri, 10 May 2024 16:56:18 -0700 (PDT)
Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c])
 by smtp.gmail.com with ESMTPSA id
 af79cd13be357-792bf280636sm226205585a.46.2024.05.10.16.56.17
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 10 May 2024 16:56:17 -0700 (PDT)
From: No Wayman <iarchivedmywholelife@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; pp--insert-lisp prints small integers as characters
X-Debbugs-Cc: 
Date: Fri, 10 May 2024 19:56:20 -0400
Message-ID: <87ikzl8bmj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2607:f8b0:4864:20::730;
 envelope-from=iarchivedmywholelife@HIDDEN; helo=mail-qk1-x730.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)



From the body of pp--insert-lisp in pp.el:


```emacs-lisp
;; Print some of the smaller integers as characters, perhaps?
(integer
 (if (<= ?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.
Is it worth making configurable, or outright removing?




Acknowledgement sent to No Wayman <iarchivedmywholelife@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70868; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 14 May 2024 22:45:01 UTC

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