From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#65680: cl-print-to-string-with-limit erroneously imposes a maximum print-length of 50 Date: Thu, 21 Sep 2023 19:22:11 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2837"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "65680@debbugs.gnu.org" <65680@debbugs.gnu.org> To: Stefan Monnier , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 21 21:23:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qjPGV-0000YL-KN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Sep 2023 21:23:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjPGK-0001Ph-4b; Thu, 21 Sep 2023 15:22:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjPGG-0001PC-Oq for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 15:22:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjPGG-0003JK-GH for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 15:22:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjPGQ-0006ad-Aq for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 15:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Sep 2023 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65680 X-GNU-PR-Package: emacs Original-Received: via spool by 65680-submit@debbugs.gnu.org id=B65680.169532415525293 (code B ref 65680); Thu, 21 Sep 2023 19:23:02 +0000 Original-Received: (at 65680) by debbugs.gnu.org; 21 Sep 2023 19:22:35 +0000 Original-Received: from localhost ([127.0.0.1]:34842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjPFy-0006Zt-JR for submit@debbugs.gnu.org; Thu, 21 Sep 2023 15:22:34 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:4880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjPFt-0006Zg-6O for 65680@debbugs.gnu.org; Thu, 21 Sep 2023 15:22:33 -0400 Original-Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38LIsoUN009379; Thu, 21 Sep 2023 19:22:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=l826Db05ytTIj9xrrlU0RRaqc78DmWo0mttGFvM/wP8=; b=ZPxmoVI/cwy0dcYdKDPAxv2xOOgFDoiSa/p3lz2HsxK9OnRdeGPUVecognXt4Rio/hQp cqtFb4ZmM+AzNiQ2dwoZlecxMvoeL+wC15ILKj3GO4clNr9ptSsks9EhJIKVZ9aKILr/ QgLq4WDsx6FegK5iSJx+lE2+LuhrAMqeZsktbel6ahkRfx1eKng/CNCgJX40oHizNzdY w/0BrSqrOuZLMMBrVF/sVyCA1uSBFPvN4sxFlYEs1sGYLTBLW20OXjU9Ew/HoN48Wqtl Av0MjwmdttcEMAtdKo+RZFrRHeoEJhCJ+1W4zFQMlFWPJJfmXtzFAB1j77s52hDYNU+n /Q== Original-Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t8tsxr4ua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Sep 2023 19:22:17 +0000 Original-Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38LIsnst029773; Thu, 21 Sep 2023 19:22:16 GMT Original-Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2044.outbound.protection.outlook.com [104.47.56.44]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t8uhbs1dm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Sep 2023 19:22:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfrZSpLDGUeTZxV44EatHHY76YYw6oL1nf0uMuR20PdrMj3D4vold37ieJMImeINrAl0rJzfkKfhbXbuVpeXkALUp1N1HMzU0mzJG3HA6mqbA6zvgfZpKMvix4PkyaHbR1axZs/u8K+JBoNZGNwwzcODa8ErCAmlCTdBtOfkk1RAc2LN8Vd5gWZmDftB9H3vYqBskraZdieyhEkBqGWeDlCFzCgD32Offqq0Ue07zBoNpJQIeWc8TFrniuQPz1WsIVBXDsXSYU62aaVL5p/rNgF4NDlBSUedPuLYK+ClNLis9zts1Ru6yvxKxjV8xUov116bYq4SHjKWJ78ItqBJtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l826Db05ytTIj9xrrlU0RRaqc78DmWo0mttGFvM/wP8=; b=YjIM8x/VfTXldaIm7kuPbeojYfl2Cv1stvTp8DPMLgBNjaNxZPoS185v0Bm4TvhvFt6eyQOchzTVXC+WaQM1UWTE6pYPDZFLetq2d7Vs1QC7lRvNmmB5WslS20/eSafjMHHWCgBNBSc8jJq1W+wID7kbCozNBd4mdThNJvFhmd4Qgv2A0YqeGOAF/6el27UInhNOVS4LI26AqNTGmBQukCBqZrc7ezoov2oFMWC5DZKOm6ZAV/5PRXlgJsqlsddLcon6jJelgr16IJv5Z1XJl8Sao8nIR2b60P5QFlLAkk4jjhXCTWRKQ3BvNLnYLDcksAIpsCxD+IBILWWR3rXiKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l826Db05ytTIj9xrrlU0RRaqc78DmWo0mttGFvM/wP8=; b=ViHcBpG6Piiifp/Fa1tKNqhoVMlmDH11rglRia31G0rPTOup7Ywe0QTFqBgADYQ85OFgL40Ku9ySgM/OGtw4gFAxTCIAHt3Q464N0K6xW3KTqarW00vbp6TX9XULyTjHWZ+OKGUWwTtAcWwsLEI06eM0ixn+Fwkza63eUfEC0mQ= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SA1PR10MB5711.namprd10.prod.outlook.com (2603:10b6:806:23e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Thu, 21 Sep 2023 19:22:11 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3b:c5a0:5222:69a4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3b:c5a0:5222:69a4%7]) with mapi id 15.20.6792.026; Thu, 21 Sep 2023 19:22:11 +0000 Thread-Topic: [External] : bug#65680: cl-print-to-string-with-limit erroneously imposes a maximum print-length of 50 Thread-Index: AQHZ7LRXfSW2TJv2aEmUHf+LIFcvy7Alpc+w In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SA1PR10MB5711:EE_ x-ms-office365-filtering-correlation-id: 8dc0d272-1350-44ba-f387-08dbbad80dff x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6uAS8eKvSck6Q1dfIAmCSh0VEgS6pJmgcjS4lJ/5I01wtWKPxbznbnOTY16/ZiUuGqg3kqVonJCimWOyYBVLCANopN1ky11CAKRLOohDILKVxtUdUUr6RUwlw0ethvJTKGSWyvfl9yLr5Pv+iJY10OhazZEGSunr7LyXgNNKbYPCazUMCSPV/m4eDu/gklYgOmGVPbDcNHDVVNNv86x67xiBJFcDS131LA1yKm4fA0u3PX2Lq02wLtkb1ZJPX5tYSOtP8NHt1MI2/qyocyLRidQ34vNIrDLoBXnBcN9piWXiSazUwaaXnc6bkNXBwPA0Nowk7nPY4f/5fNLvVGA5GF95RcgbpZ8V+zdepUM114ts7Zl9PyUcCqqlnP3EwpSMUvFFsultVB2XIrb4AjEGybOaeXpnAECC1kY9l4WfczTnokRXd0SzoFMy+iIzmYNXXehxkKCtkKWybKGP1h6ePGvDjb8ubM3oOR9ZDkN9U2gLbQY6lMO5/D3EuK1sMKaaAvdT0LD45E5zwu3U9FKUN3Zt9HVpzyI73jTWoksqXBVnveF4itEWNe3DBMzegLh0IjcBEr33u/88fpUutnNVHmHcR+BngAOfnem+O1opHvHcd9FFJf3hpZMlCSYFEbjP x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(346002)(396003)(366004)(136003)(186009)(451199024)(1800799009)(478600001)(44832011)(55016003)(5660300002)(296002)(6506007)(7696005)(86362001)(110136005)(66556008)(9686003)(66946007)(38070700005)(41300700001)(38100700002)(66446008)(316002)(64756008)(66476007)(76116006)(71200400001)(8936002)(52536014)(26005)(33656002)(122000001)(8676002)(4326008)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: SNT0Fc0hI8ZiZU1A8B2LNeOXWVOQNHJ+CPb4oo3qJXwhFZoweVCms4Ix9b1dogpY+rDQsOXqrfKD6YRmW9SN8TwSljth02OSf+byR5yq01NKaJCekipnIP3CDckJ7nsNoqbcX5w6Rj5kGlHXrGfYg0D6JBfsnS5r1VJF1AIehxnmZhvojOwXXnGw8qztPxUN8u+F2Tuhy/bOHC7sqY0sWygIgJ7nuhd5/NxSdHZnTJbL4WffbyUYR94hNxrU+/SNpQD7IKkehmgLDqK4+NiTSfYliHhoZ0GifDIhMsuuwkNNRRPNllLQ8k954DlKjKyD7T/ob5QmUEIQq1DQC30RuQmsPHdKcRRxp86PPugD2BoLnvgJyyfHKQ/Xq/VaWhsoegmQfa4WODu3fwi5P/6/HPjYZtCfAaHaX7ERR+0pk8ZFcgzixmho7YZU8fLD24SNgT/GneOBi+dnXZhMjz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/EQC+PcWaj59j9uS90yQypTSWbCRQjTvUwpT664N/+WDAvHZ0TjhQHdxGSBodm5ssYNejF5ve/oibifvwA2VWR5fThgtp8WwVNChYAbsPwOTZr8IOrtt8lpFRNsZCNtj8it0Y kxv83WCNLHKrr9krprDWA/vZAV2aiBMesXreq4FXJkxLFeeegw3GmyuTsxbmwAwazluJjVkGmOMtktPMxBI0IYKnhaFLm3fHs8 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8dc0d272-1350-44ba-f387-08dbbad80dff X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2023 19:22:11.3236 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wPODA/g8pWLPbZ7jZFrr6D0qlsCn7k7zmjO+7xLALBERmEYjE+encvv6S5r3qKViAdX8WCOI2KT+JOhR7oflCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB5711 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-21_16,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309210165 X-Proofpoint-ORIG-GUID: vtFyxBwkn60wtIrFC97IrajaS5Y9UyTh X-Proofpoint-GUID: vtFyxBwkn60wtIrFC97IrajaS5Y9UyTh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271020 Archived-At: > > I still believe that not truncating strings is better than truncating > > them to the minute length of 50. In fact, why truncate strings at all > > in cl-prin1? They're not truncated in prin1, etc. >=20 > The main purpose of `prin1` is to print Sexp in a way that can be > read back. I.e. for machine-consumption. > The main purpose of `cl-prin1` OTOH is for human consumption. > For this reason it started truncating strings while `prin1` doesn't > bother doing so. Not to muddy the waters too much, but FWIW: `cl-prin1' is a far cry from an emulation of Common Lisp `prin1'. (And for Common Lisp `prin1' there is _no_ truncation. That is, nothing in the standard allows for truncation. But _implementations_ could provide an option that allows for truncation, AFAICS.) > > It doesn't. String lengths are a completely different kettle of fish > > from list lengths. >=20 > Not completely: they're all concerned with truncating the output so the > human gets to see what comes afterwards, and to a large extent their > optimal value for any given string/list/vector is probably one that > corresponds more or less to the same output string length. FWIW: Common Lisp treats strings very differently from arrays, vectors, and lists. It specifically does not let variable `*print-length*' apply to strings (and there is no other var that does so). > > To solve this problem properly, we need, as Eli has > > suggested, a separate variable called something like > > print-string-length, to be set independently of > > print-length (and print-level). >=20 > Sounds good. Yes, that would be reasonable.