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#47368: [External] : bug#47368: 28.0.50; map-elt returns nil without "deprecated" TESTFN Date: Fri, 26 Mar 2021 22:40:34 +0000 Message-ID: References: <87sg4kyw1q.fsf@tcd.ie> <87lfacvtwt.fsf@web.de> <87sg4h21m5.fsf@tcd.ie> <87k0pty89m.fsf@tcd.ie> 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="15622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , dalanicolai , "47368@debbugs.gnu.org" <47368@debbugs.gnu.org> To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 26 23:41:30 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 1lPv90-0003z9-01 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 23:41:30 +0100 Original-Received: from localhost ([::1]:37184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPv8z-0003u5-0r for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 18:41:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPv8Y-0003S7-Av for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 18:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPv8Y-0004nP-3T for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 18:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lPv8Y-000116-1e for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 18:41: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: Fri, 26 Mar 2021 22:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47368 X-GNU-PR-Package: emacs Original-Received: via spool by 47368-submit@debbugs.gnu.org id=B47368.16167984463873 (code B ref 47368); Fri, 26 Mar 2021 22:41:01 +0000 Original-Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 22:40:46 +0000 Original-Received: from localhost ([127.0.0.1]:42806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPv8I-00010O-8a for submit@debbugs.gnu.org; Fri, 26 Mar 2021 18:40:46 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:39296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPv8G-00010B-Ba for 47368@debbugs.gnu.org; Fri, 26 Mar 2021 18:40:44 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12QMYwrW046782; Fri, 26 Mar 2021 22:40:38 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-2020-01-29; bh=chpE0mkzZPjU8GVh0S+78ME7i/lNxm7oSR15rNf/TLo=; b=ne0tz7QBneR0CYcfopTkIXp/mDYkVEWolc90yEs4CnbGpYMQQ1tvDf86ebNApGyr7Fjv DmtRoIS8TG7HacSwPBvVWlNeh98Z1CzeP7byH3zpZwKqu5vMvfCZXSwt+Mm22orFYAV5 cAqJvMPOu3fRZjDn25uTRb682y/heccB3IuFyVvXyhunHcpqJDJtCu+wuL0pUYo5JJiI LGN9uKpqJL9BQZOkrZgFQ1bk5hD7buIfwwR1mn/UFcjgmj0Q1bLHGMJNENnYso9NOS3q trnbEQruiabaw4DpCdwxqXgwaeZW9TW7+Jmzk4/yf/mDZ002xJ88RFN3yrXcluMUAZW5 GA== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 37h13huhev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Mar 2021 22:40:37 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12QMaMQv190283; Fri, 26 Mar 2021 22:40:37 GMT Original-Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by userp3020.oracle.com with ESMTP id 37h14hrk34-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Mar 2021 22:40:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMJk7v26uGkbRRy8aiNvBIY8rwrJhKIXNqHKNSWlGtYDr47ajXr0tmktlRh4u+PCrcFK0Cru6zT1iKHthlthhLyJuNc4svcWMhpKoHwzBTiY/Z07gnVIpknpyKAMM758StDYigTvbw/51RKQyqsAzBO94Nj3oXqT4KjobtKBs5hLOc/CfDQdHfktIhi46mPot6Iy2DpdnQUwHktGtll0TEuOn616SJmsa5xxUe54j6JV5IOajIPMmAyqSyrTNqVnvU98E/7NxA0m1rKeVTR6LxZld4wiW/YzzHirSdzVDVfsJX2ccNwD1YWX+sW8Q+GIm+2ZDKHtetUCk0xeCUzvwQ== 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=chpE0mkzZPjU8GVh0S+78ME7i/lNxm7oSR15rNf/TLo=; b=kn0aCjvmnkgPsMnBFhimfRzQdIRcQTXk2t2U1XCOxQP7WCriLaljnNEcVNBvKyvg30M1mdhnn6C6Qijzf8PvKsVQIjKhpKUN1mBxY7kFiQKj1En7rSwOJPAGI55M4Hw9+4+/lwdh9oq8IQOaqlPx3Y8vAu8aDul0twM7eQtzwvET7pvPczH4poDFwSpAhJsfjO6fgT9XPSW/hwoMASw7CzhaNLWIQ2ay+9zPSqta6/A+lsgkznJrOJQKg7GW0yjp9v5+qjDOjiR0XKqiIeHcXw0w4lt4a6AJaNVBrDFi/BIiW9jVi6WEq83Mcu3n7JIvozwSsJn0z4S5EYazTuHvQw== 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=chpE0mkzZPjU8GVh0S+78ME7i/lNxm7oSR15rNf/TLo=; b=oFouwbMvM9OHHsI0fMbDM0/KY2TvJFmJAj8cB4g64pWpeefNIuofwcuvaJn4p1VfETJr2LpKPrshyveGpqTRnmDQ4C1m2+fjBEhiJyR7qGnPJ04SqIf03UO14S4/DbfceZABBBa/FLHEwnlDk/KdPJDi0zB+zVAl0jTxAwtd92s= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2430.namprd10.prod.outlook.com (2603:10b6:805:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Fri, 26 Mar 2021 22:40:34 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3977.030; Fri, 26 Mar 2021 22:40:34 +0000 Thread-Topic: [External] : bug#47368: 28.0.50; map-elt returns nil without "deprecated" TESTFN Thread-Index: AQHXIn3XLebR0KaHRE2BfaCICihcTqqWy5yQ In-Reply-To: <87k0pty89m.fsf@tcd.ie> Accept-Language: en-US Content-Language: en-US authentication-results: tcd.ie; dkim=none (message not signed) header.d=none;tcd.ie; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 677b8fcf-5006-40fe-0c12-08d8f0a82b61 x-ms-traffictypediagnostic: SN6PR10MB2430: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VXTTwXyrfW8kS2Q3CCvR5cR559SeiiBxoEaa/live/CyEs6hsWwaH2I4Bt0E3dU8S9eMdMqgYq7Ew1jfO9NwLUBKzlRDjQzBOQ+8m7dhIdbWFXQq2uBwuCptXLYG+E/sRZqKLpHygCs0O3sSSxZu3yQAC9KQF9f79EhffHCQ434k7KR1bVwmWY0pvp5fZUQZGmsuiPRKpwOvKKxcvBz/K5XF3hAJDrmz3XBpo7FTxpEsD0us51bR1TngdosoaURGiNaRke1hK8WBlEAuhKE7JZ69v56fxIyEfvXnLkGLSV5iytkIT+n5tTVgJqiEhT094l1TCzShEedispkLD9Qc6oUwMylf6T22WQCEebmd5jibZ5bIlGMSoHNLIffNwEz421f8I8Ct6j81Es4THZ1Uakhi9twG6prwD1wkwnkin4tVYw/FMHI1kTpiL+l5Zsdrw6tKmnMDTDVaQUGMz5HlciA5c1j5lXSbPcRJakgKSqEFhuhn4qCLN+tB+11d4v6ZifBNokFVx0zwCKYl8HmJDrtbnm1FlqBNyFoReb6JbwmnoRefprDl7L8OofHvIZLhvXdFd1ODmPjgi9S4tFivoIn3qQCi71SqalOcsaxlAD222sCc6RmaJiBp71PfrD7FcNy4R+VBXIy21XtVtM1BIvG4L9EUcKcX5/78OxqcHEs= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39860400002)(366004)(136003)(346002)(376002)(66446008)(186003)(66946007)(33656002)(52536014)(5660300002)(8936002)(8676002)(478600001)(66556008)(54906003)(64756008)(66476007)(76116006)(86362001)(44832011)(7696005)(26005)(71200400001)(296002)(316002)(55016002)(4326008)(83380400001)(2906002)(6916009)(9686003)(38100700001)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: cHXfIpyLOgKAMLmH+mEDjG72oax4SrsGEi5X2XFBvd8f5VkJxDEO6Pr/i0JPhGBvEnjgGlfBx6aWesQj/AVD+geHYtCg2x5hglYw8MPStFj2ekPcNjK15e7BrUoK4HGDg03VzpGOjtpp8UXrnUve65hpFsIsHNJRqqvzK9a9g+X/TYvO/M5eQJXheT3iuA9yr07ngrwaDLe/crmgIy7JYkntos4iyPrcXQG+45+qI4YZhzem6PA9hIu3pWoH5Ary4DFHIWb5xVc/Jm2m76bnXYv1+Bm19MDpUXdJc0/WWZ1cJD7+OgJOY2vOH4amsuNqkPHkuWuOoPY/tHac7rNBL84zi+ixv0r/o65p+D2dBZi6dgHO/5L45x6PIv/7YRNVvI3+NpMyQgurWlHL27byx3+oSgILittO94VZAV7Xi7fPbg9EgaGKWnYNnD8r/SlRzdL7IbcAUhdjWoAm4C5poOqPO569lX6jRuJoGVPfE0fmuyICR1cLyJmvJZ/2nwLPPU1dANBeeyiEcOPikTOollPncQxBab0H20+CODOScJpYDko6/8JES2T+WRtF64AC1YCCpsa6RaULxn6yGvA0Ew4YoIojR9k7/jDiMH6jhqL8QAMILUFBw2s88EiwekLTKsO7wNi/bDLKwIe68oCy3hsTw1yynYpAkIpMKsByUA3LTm/epYP9Q1dn/ultwbR4E06GC8uHr6WnC/hPo8OP9lhMEqs/g+o2awSbIwbe1/M4JJvzgsUF5Hai0wGC Pwh9b+x7+ykOM7hf4wvlJhz9P/QmoaId9GkEToSv6elEr/CTV3P+WZXAF9v7DuIIlU/FCfxHlBbpGStILwcfUk9ubPVvaOtDDr x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 677b8fcf-5006-40fe-0c12-08d8f0a82b61 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2021 22:40:34.4722 (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: AggeNr8AcBZpbO6M6Fs5HsijQM+b7RKK4vRK23oLkSWSyBQyutujpRUAB1F1vz/nMg206E0r/oEQPT1HJOG8ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2430 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9935 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103250000 definitions=main-2103260167 X-Proofpoint-GUID: Y1tJCMH3MLibC_7JHHidjOXAcYeZhsKU X-Proofpoint-ORIG-GUID: Y1tJCMH3MLibC_7JHHidjOXAcYeZhsKU X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9935 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 mlxscore=0 spamscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103250000 definitions=main-2103260167 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:203085 Archived-At: > > Nothing about eq being the default, and nothing about > > testing being also possible with the others you mention. > > > > Not only that, but the doc string says that TESTFN > > is deprecated, but there's no other mention of TESTFN. > > > > What's TESTFN? Where is it specified? It's not part > > of the function signature that's shown. How can you > > refer to it if there's no indication anywhere here of > > what it is? This makes no sense to me. >=20 > All of these points are already being discussed in this thread. And yet in this thread you asked, seeming to suggest that the doc here is fine as is: What would you like to see clarified in the documentation? Seems pretty clear that this doc has more than one problem, as I guess (hope) you acknowledge now. If the function handles different kinds of data (alists, hash tables, ... whatnot), and if its behavior can depend on an equality predicate that it can't know (can't even be passed as an arg), then _that_, at the very least, should be stated in the doc. I'd think that if a test function _can_ be used for at least some types of data, such as alists, then it should be allowed as an optional arg. Just because a function is generic, that doesn't mean it has to always act with lowest-common-denominator behavior. A hash table has a given comparer. But so what? Is `eq' the _default_ comparer, or is it the only one for some data types? "its default depends on the MAP argument". Maybe that too isn't generic enough? If `eq' is all that's allowed for some types then it makes no sense to speak of a "default" those cases. You said: That's what the docstring is trying to warn about: alists default to testing with eq, but can also use eql, equal, or anything else. Hash tables, OTOH, are limited to the test function that they were created with. So TESTFN doesn't always work as expected depending on the map type. Why not allow TESTFN, and state that it applies only to some types (naming some of them)? Why cripple it just because it's limited for some types? Are you sure deprecating TESTFN was a great idea? If it will remain deprecated, then at least add a statement like what you wrote (above), to the doc. And let users know how to use other than `eq' with an alist etc., since you tell them that `eq' is only the default and they can use other comparers. And especially if the types are limited to alist, hash table, and array, just _how_ a key is found should be specified. It makes no sense (to me) for the doc to say only "If KEY is found". FWIW, a cursory look at the code suggests the type can also be a plist, but the doc currently mentions only the other 3 types. That too seems wrong.