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#50110: 26.3; Doc of `assoc': TESTFN optional arg Date: Wed, 18 Aug 2021 17:36:11 +0000 Message-ID: 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="17826"; mail-complaints-to="usenet@ciao.gmane.io" To: 50110@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 18 19:37:14 2021 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 1mGPV3-0004Rl-Lg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 19:37:13 +0200 Original-Received: from localhost ([::1]:58998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPV1-0003Jy-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 13:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGPUs-0003Jp-VJ for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGPUs-0003Ix-Oq for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGPUs-0003Vq-Fv for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:37: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: Wed, 18 Aug 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50110 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.162930818813451 (code B ref -1); Wed, 18 Aug 2021 17:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Aug 2021 17:36:28 +0000 Original-Received: from localhost ([127.0.0.1]:57507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPUK-0003Ut-3R for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:36:28 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPUF-0003Uh-GS for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:36:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGPUF-00035Y-7e for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:36:23 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:26486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGPUB-0002gM-Rm for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:36:23 -0400 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17IHVxdu015608 for ; Wed, 18 Aug 2021 17:36:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=J4EsSODEOk0PvNNX27JX0jEnIqaivrZFeaCaYdTnnDg=; b=Ishildz/pGP+qRSx5Sd2LHlqIA+8lRxEucUnAQ4/tDr3/a1+OUkrAsKsL4xipXMsBx3M cNo5ZHA/CMmFqi3C7OzeIyD6Dh5ysxixaosRxd9j490YiK6ujuxTjWHMQa9f/5kklbqF lHWhSJBXX1nnm1ltk7EUww6gg+wThiDSV9QwD5naVSqSvTJkGBnyUEOVwOv5X7qgWSVa QuenyOqmOx/jaKvv0Of+r6CXzWUmHHHFZQf78h50X3tGzuNTbIniHXYtOlOBUgH51Qb9 Zzj+AMPIlBzMTre7C90oa2dAhK6QDsaILgF/Pc/kR01UI4aA3ul9dXXjObe2eCvqAS1P 7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=J4EsSODEOk0PvNNX27JX0jEnIqaivrZFeaCaYdTnnDg=; b=Z0jyRfQpMUvpEenrOUEAwdDY1CTXBRoT3jdgwTMkegoNwc8fIOzSy/LOqqj5R7+oHYCZ AFCdDhMvx5duty4TJaEWYmGKAxysiCFrn58XGs94w70JeShu1qPHQwDR8YmyRoICIKlz S7YqoBi2U9QXMpeaLaz0mS0jeLuT67wPtYYd6UIDxXLey4KYnbaQQfRK+qNlSxSMwzVx mtwM3EANck7fiDEZOHGU3tl4irRUoxgi+jIfN1o3iKVf1c9Rgor3ofbBml7oU1p7d6eE IAescAp0y/8E8QfT3xwvYEahCdRcvk3ar2GK6yderw5fd+JT0+ZlprGF5RJglxoEVwQ0 qA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3age7dbc9y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Aug 2021 17:36:16 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 17IHVALn145892 for ; Wed, 18 Aug 2021 17:36:15 GMT Original-Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2172.outbound.protection.outlook.com [104.47.73.172]) by userp3030.oracle.com with ESMTP id 3ae2y2mh3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Aug 2021 17:36:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=InmQ+LQVrZlFLfdSualiUZk8eg8KwjDdUqh+uPBOJkcVWK8hFvxG3IzVUGWf4FliTl1VBEJgVWELTMibn8BYFXeV4AY3EcjVMVPirueAWC9BGAydcXZNIcaLiyUGiYOrYXMNBwOjJmIn40KxvBVKDtXbyBu8suENngez5TX2P+Ka+uXlE/79pvpnCmFKRNCUdATzKq5FQTZbJA0XVpCczodPaN8jF0vzC1UVQnKsUy7fPkNl+jxG+jMfQGqPgZjZntnxXt9eiZmHKy+yLHS177k8zN7zwdIPGCjbDsy0Zn0gNlc0DeVzxamgBL4NHf5xYGW2l5URh6+O1paBpMkIiw== 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-SenderADCheck; bh=J4EsSODEOk0PvNNX27JX0jEnIqaivrZFeaCaYdTnnDg=; b=k5wP3BsTOIv8bgzL9gPYFYUpZC9PuKrilN187JJCca7JMV/tI0Zhs+1xFnAKqYRENxOip6UDKsydtrfHUxi/CfvubmegWmJHH2TEYO5mhdpQo8alchiHfS0/b82lfKc/dg3/wnqTod6KDlMCiOhoVYALdTQVf9AUVbX4Mm3Fs8FwQvi5Z2Ob0le7nUDGHW5trX6Tgl6QfkHsJfxomawLLgSpz9cD3JTbvbVOmIECgYg/FYxq2kduvOslAUkUSbMhwllqR9tp51UtMWi2y5M+6Iyb2Ae8xA+HNmEpyhHtl4MK5XVgtcP2BUpMQcOWy8PglvdIxiX2dzoljjkM8zplQw== 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=J4EsSODEOk0PvNNX27JX0jEnIqaivrZFeaCaYdTnnDg=; b=hITN13jS+FzCRi8OWALi8F3e76huaF+d3SUV4/IhUkHvwO9JQGlt9ilcVg13KSWZ4Ej0KsnLDBKHRkjvMIJThW/gteftVPRn7Kiof8uW7IjTY/oG7jM0xhggA+xxhtqN3IY+qlL+IXcMEMkJGFZ1ELDE4AC4yc8iJ7IbzRPHmh8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB4768.namprd10.prod.outlook.com (2603:10b6:a03:2d3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16; Wed, 18 Aug 2021 17:36:13 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a59e:fa26:ffe4:615b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a59e:fa26:ffe4:615b%3]) with mapi id 15.20.4415.024; Wed, 18 Aug 2021 17:36:11 +0000 Thread-Topic: 26.3; Doc of `assoc': TESTFN optional arg Thread-Index: AdeUV4A1o9NFT6AiQI6ApjK5kHgDBA== Accept-Language: en-US Content-Language: en-US authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6edea447-a4c8-490d-39a8-08d9626eabc1 x-ms-traffictypediagnostic: SJ0PR10MB4768: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: neZsdGwUXvg4KJP7qDSHnKWhcmjGo/QGYkhuOhW0YIGasXZ2xWJe5CdyFkifTUMama68fmAiH4kIv0+L/t2jqK7BArZgnEW8JJoowy4i6Ai12EROmClEn/xEO9nM6dOO9x5EgvlQFZnPnF7EPfYtt7LguneQCyBhqdGZPN/gOQ2iDzMDYj9KXW7+MFc3WGYi1CJEYHSUJWBc89DPMZPxByGmRCuuWsFgvPL5TeVNLtSjc8RdtC0zXpG9TOOFPDfoMnTYdT9amrPCkCK++r6G4zdgEtkiifCsYU47zlxuo77fa+1yn18QeSuynOPWCyGTOg53mCsiZFnGnIoUWv1k6IrSBm3LL/3rnLdzkrRuMF91hCpZtblM0kxnxHNInbha3V0cG+lM0sBOIPvHLqQ5OuRiKJKFP3u3PdTFoQKZYeaI+wJ81pAMFBo3YmYwmpcHn1MXql4sLE4LWw3TkRX3HiUufxVgT/l3muEBf0x/v4aAWrqX56hK+ds1S2EbL1e76Bht5zLEtGxst5WTLMg6lm56lZQ3IKWIxgjiieTT9BaKopxiitz9GCsDjrFJMu+MeSWPAj5S97oYWi/JumEfQ7bp3mi39r1GbZyymzwD7ca9Udw1pDKVbaZ3wd4jYZqmR8BcKvHDrCQrvzi8qsV/qO7f6C3yCCIOu5ohVz8nnAVQkL2ZTdya7AXFTZ+njJxqlNgglwR9EVEoDM7KraT7sOplft23KrDivACxMHgyv6U= 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:(396003)(39860400002)(376002)(346002)(136003)(366004)(64756008)(9686003)(122000001)(7696005)(66946007)(5660300002)(66556008)(71200400001)(186003)(66446008)(4744005)(86362001)(38100700002)(55016002)(8936002)(2906002)(45080400002)(76116006)(6506007)(478600001)(66476007)(83380400001)(44832011)(33656002)(52536014)(8676002)(6916009)(38070700005)(316002)(26005)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: dW9SR2CD3FNooM8VsPtIFKgW1pl72AG7wU7EMvya44PN1uznmlDfZ1u9is++zcEwnfOWp09v6BY17m17yYX/hMfvJa1WYtCMv/oLBKI55sKYvQfh5fu60Eenn8uaEGhYsna8mxT2SFdNO156diK7fEI68WWTqCkpwhvDfOxsndAz545KY/FkpcwxIbUi8kWhCtjnjks7iBGbkMYcde5OkBxiFg05jbxLelBzaSCXj7u3lqODuYzSPyonKI2r5Ui9VZTmTbtNGIP53cFQSUovNqzYb0A7NVZe7tYahN9wTAiFPzSh+rrYj9shujot24T6iUH2Gy1bIxYhXtxR+uH/1pmyzIvmqDLIlr0xwxLnGNiTBjxEhAxdAKlDr3phjgZDraUw4W+XMnfVkLTK3ZO0W4m65XKDbp/2YG0znuNm6JH/POHbokErqeRei1xMQX9ILmfQo4CuS8NkJ11ooRytPi02csldwiP413G4HJ0YkUgHlneJY7oD6k2YJuiBzrt/mUpBFfAVwhiyDtH0ExxvnCh1mbw6vvnaNZnwVAVUIkqufr7Y6LNUobTkc8swc98A8MfvcHaCOS1eg9xR5MgFA3DJGSme0yXvtfzXUdFmGVqvZlh3pT3YTN/3eMugyJfUjpi4rU9OD+/uxxBQIJbEZeIveyDNblzPMdlYya7f5Yz90EFnJieKaks3dHsQVmLaik28jUJyiUDl75u5ltnnqDUmb6nFbRGsTDuUAxka8GZtxi8dPUhfgYU3V3 TrbuygEXOQOu8SOaERN1prXyuXu1WJHbwy+CfsnEj+Jm8wIeAm18O4T9vPu/Kvw3Iv+Trhlj33hNOWMb2IdhR5iqG712L68ebF x-ms-exchange-transport-forked: True 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: 6edea447-a4c8-490d-39a8-08d9626eabc1 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2021 17:36:11.5813 (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: coLSlJVFdy7z1TMdMyrhQYBPh3B6YySbOy5OLk1cRUed/7qZy+vky/A9IJLtTBEm4dTFqH39HzqiYs4OAc6w2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4768 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10080 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108180110 X-Proofpoint-GUID: ZpSXZ7EpxVbU_WMAaJa1LuewIgDOHqul X-Proofpoint-ORIG-GUID: ZpSXZ7EpxVbU_WMAaJa1LuewIgDOHqul 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_BL=0.001, RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:212167 Archived-At: Neither the `assoc' doc string nor the Elisp manual, node `Association Lists' explains the order of the args that get passed to TESTFN. It's just as reasonable to expect that the pattern is the first arg to TESTFN, instead of, as is actually the case, the second arg. E.g., one could suppose that this would work (return the first element): (setq trees '(("pine" . "cones") ("oak" . "acorns"))) (assoc ".*ine" trees #'string-match-p) But in fact this is what you need: (assoc ".*ine" trees (lambda (x regexp) (string-match-p regexp x))) Please consider documenting the arg order for TESTFN. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.19042 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''