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.help Subject: RE: [External] : Re: Surprising behaviour of 'append' with strings Date: Sun, 6 Nov 2022 21:45:24 +0000 Message-ID: References: <6554cc02-2082-3dca-73cc-05fee1c6c4d0.ref@yahoo.de> <6554cc02-2082-3dca-73cc-05fee1c6c4d0@yahoo.de> <87y1snbz6l.fsf@web.de> 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="17036"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Heerdegen , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 06 22:46:20 2022 Return-path: Envelope-to: geh-help-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 1ornTA-0004F0-70 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Nov 2022 22:46:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ornSa-0006Qb-G2; Sun, 06 Nov 2022 16:45:44 -0500 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 1ornST-0006OY-Nu for help-gnu-emacs@gnu.org; Sun, 06 Nov 2022 16:45:37 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ornSP-0006f7-07 for help-gnu-emacs@gnu.org; Sun, 06 Nov 2022 16:45:37 -0500 Original-Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A6KeYUe013598; Sun, 6 Nov 2022 21:45:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=prLUni38WhtJtYEYTrLiwetdCceZRcqqUIXKjAx8QC8=; b=aOO3Go7rf1IS5ZVf73yT1knQCiXHQCCItSFTSwYGpFH90/w4aEspbB6FQazhDhfxisVP C9ARt+3n7NFdAMxhlKl3qRNsPxU3QVQFOAQvsrWRQV7CPkXXEJRrxHMedHndyY67BQvO GxuPE4Y+Q/XCP3qDiBVxK2X4Ir6bnWs3Q4p8uUbUy5xmthC9/7aJjzrogASQFCa65lRh cqoLt0xIxeA3aJ0T4rkgxC3mHWwaRYvY5kLW0PXHotlP03gnjtjXQBc4DHs/+0qKY4W6 JcZN7YM1FwQTqoN/uh5WvlFTqbV495dhYG2A84+FbN8ccqPRUSz2C5xs8Yrvg6VYVOJ1 vQ== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kngkft88d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Nov 2022 21:45:27 +0000 Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2A6KpNLs015141; Sun, 6 Nov 2022 21:45:27 GMT Original-Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kpctaeqgw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Nov 2022 21:45:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QPSQLNe3inY0XXuRzSvUGbcZWW995gzPVp3K3vp60BGw4gWvbl6oq4HQ+Zic6cS8eaEodEH+i5q/6s+1aCy5icF+u9ckC4IP84s2QOyVftKMMxDcHOobL+xRe2ZAtSF3lTfWtom1m/WVzIH3ytt1yA0w861hIZw6/I54qsT4QW88E1R21iXNEcXp5fJkhz4Xim01UXHmPQmOdWko9w1TNkjcPR+4uElgRnR8LhJk8TjgnlwyTzFwJVMWlQfJuPqGgDmmB9/eHx1kaU2GOIgbVgHOYZJGIu9FNHa0SvOB2QdqqkZVmo925y4t+vnQriBRPvlgjJHZNsIhUyp+cvMEzg== 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=prLUni38WhtJtYEYTrLiwetdCceZRcqqUIXKjAx8QC8=; b=CAm2uBTbb48VHwRgEq/F91aR3UFSFhJrXDbCwr4nyz6n6F5ZNpHEZt3lyk5W2HssZW4v/O+ZN8IpBn5mAzcmebWCM/PmznJbwG3JNW0u8/PevvQC0Ui6z9DDFJZ5FpXk0Mjk0veNcTfZnMlz1neCRqSze7sAD/YLSIvd6dPjrE7X/apqoASuaJxBHiSmAFvu2J50N0MRYp2K5ZrPM3t7I8vi5QQ4pF+zeVcnoQcQKX6UsfEt4zSkEC4dizwPZ/dNZyaUL0E8ARVN0rr2Isz/Qwk+fCJwjG72U9inPVilKA7UZDdKs0dGdzaUFpeQ7EKruuiFSVUDj7N03KGwVK6g3A== 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=prLUni38WhtJtYEYTrLiwetdCceZRcqqUIXKjAx8QC8=; b=XMs1EyjlZprqWCoYHErVx8FqTk3S5+WfB3l4hnqjQM5x+KyMmcyM19QhJS1klKMQzyykQAYKuu1lz//0o17CHLnK8TPv8xGqrgOUm2HmovfYGUh9vuIcl/dy5hMwbBZWgUi+cvW2xRMPjngcoYJGKpFkGZZVc30QzILHPha6m6U= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB4589.namprd10.prod.outlook.com (2603:10b6:a03:2d0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26; Sun, 6 Nov 2022 21:45:24 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588%9]) with mapi id 15.20.5791.025; Sun, 6 Nov 2022 21:45:24 +0000 Thread-Topic: [External] : Re: Surprising behaviour of 'append' with strings Thread-Index: AQHY8h8tHbYmoovBL0SssqJ29FkhyK4ybFLA In-Reply-To: <87y1snbz6l.fsf@web.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SJ0PR10MB4589:EE_ x-ms-office365-filtering-correlation-id: c1854065-b165-4cff-ae33-08dac04035ec x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: M+89yRmZWRmLAqY2JB7xSTN/k0/FsV8rlX+dHbTJf2y7DrU1O9Rd6LKG19VAmq95eVE1C2IfI1ss6FwlKWmOrp1O2dlWOXIoXkAaJI8kJM0NCyrRzrokYppz5Q5dsCFjKIMAWIGZU15HwuHjztBINHRyNDMgGQ7Cukfb7OvPz88Y9Wltw7caXYsq/QF61Xp6LH3z/iq/H+IB9hdC2HPHGE5Bl0VTeuoM10J0tuhOJdAQslfwXucpE8VyDzZzpjLS9I4Qd3+TjbKdHMv7YaM/jeOw7iIdnzoWwwwkYJpWqyINi1WzSeMxS6nwhd8Ls2fhGK6rsFiQfz/LOSYbknFRaZ+wyajKE5Boe2WMNlYD1NwgQ5V9AFZU2hAbhqYiVlckhA7cAHvfSFvpOoNBSngykkn8zfTHd9eFMKVGPQZzBdtAjrXThNxdFJ/ZV47Nr3MFuURIeDccPzpDVETCp/DsMR1I7p1fxDByp7MWUUub7OnE4m6czY9eP/SRyi+u4pHdeiRVF0bIDYpNKW6iJklihVZMWJuYbnU2RUxDYBMKCtaheaIQsvEzN2sfSXWEpvDSANQDaM7AQ3XwpNW6fZ6cBoE8SOgbfMfhDaeT22T67KctomfJd9KtkJj08e20hDpw9xdKVsNDY+QHe3SJ9IOK0NZ8Ss2G+S9pZONAmuXhjV1Cj/yTlMsETDOOgDx3al1c/kp9dqUvGBmBfUaneJN4fAkrMslk1OCpSqXTkb7gampgwFKhs2aA8LbY7p9XI shwtxiZNFB4leTLU03X0yxR4g== 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:(13230022)(136003)(39860400002)(376002)(346002)(396003)(366004)(451199015)(33656002)(86362001)(38070700005)(55016003)(4744005)(44832011)(2906002)(9686003)(186003)(26005)(122000001)(83380400001)(6506007)(7696005)(64756008)(66446008)(66476007)(66556008)(66946007)(8676002)(316002)(478600001)(110136005)(8936002)(76116006)(5660300002)(71200400001)(52536014)(38100700002)(41300700001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?QNqiTPVPdBAn5C3rkP5BiK11SmR6wI1uoDWeoMWowdLEEEWkyPMUKjU/dkHS?= =?us-ascii?Q?M7Y0SbKw/bc71SBOjJJ6rFZBLZlJRT9u5eJDq/kVFKyyzJQFyW0GQkcWq7ie?= =?us-ascii?Q?QLPt7bPzpDa8VGKG+9l8CbI02LFGz4ilfbycQwuDpZbnFny5jf++jWW+wnJI?= =?us-ascii?Q?BfuOUbgEhCS5Y31d7wrguTozLjUT214hTfTCeFvIIEcMJ/xb457btG/1nsk0?= =?us-ascii?Q?gdaVw5NBL3QTYJJfxKMCBd4zqkqZrnTT9Q/wQm34FyhHvhNrUp0xQwWiqtVc?= =?us-ascii?Q?B6VKWhV15afa/XlRs+tama3fpyuWm+266mdWF7ACL6/ls0fbXbouOxUm554K?= =?us-ascii?Q?AogUCm17SmbkKsQooUdWl4weHRlAscjT5aFFE5zdsX3+E3tqGsHo5xhaM+/e?= =?us-ascii?Q?oRttVs6gPwxhqrHZguFTcYrP+dHxn5+meQLpDd60BDKLGXfGadnyhFLrHDsf?= =?us-ascii?Q?Dhd7buzyF21X503VS0V4KnyipPMYkUgg7tbyqGgWpPyW2iz3Kz33Zr37xKOi?= =?us-ascii?Q?djhl8j75WWr5mgGQL+xecZ4JlYOwLX0MKTi2ve17lb4ktzPcQ0qXFbKjKTa3?= =?us-ascii?Q?5+wz79WTk0ThMhk/0lEU8/DRidwM7jwmT+Ud5Fv7AxLgOOpn/4O/sItNFkXY?= =?us-ascii?Q?gi 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: c1854065-b165-4cff-ae33-08dac04035ec X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2022 21:45:24.1178 (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: gyh43HnIYiimq6w3jZysMZwzzITMyUqd5jZ8psrXCuvyTE6n16PooZsqkyt4xlCZW+0dHj986ER9uoi9KDiOdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4589 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-06_14,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxlogscore=581 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211060194 X-Proofpoint-ORIG-GUID: gdcf1g_LIXW61NZ3kdtCFl9XOv0-EQDU X-Proofpoint-GUID: gdcf1g_LIXW61NZ3kdtCFl9XOv0-EQDU Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140747 Archived-At: > > As a bonus, 'my-append' should check that all elements are strings, or > > list of strings (no nested lists, and no other data types). >=20 > Use `cl-every' on the result of `my-append' with a `stringp' predicate. Maybe. Depending on what OP means by "should check". Maybe he means silently filter out anything that doesn't check OK. Or mayb= e he means raise an error in that case. Or maybe he wants a report (e.g. a= list) of all such "bad" elements. Maybe he doesn't mind creating multiple copies of lists, to do the checking= . Or maybe he does care. If he wants to know all of the "bad" elements then he needs to always trave= rse the whole list. If he wants to raise an error as soon as the first "ba= d" element is detected, then he may not need to traverse it past the first = element.