GNU bug report logs - #47368
28.0.50; map-elt returns nil without "deprecated" TESTFN

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: dalanicolai <dalanicolai@HIDDEN>; dated Wed, 24 Mar 2021 22:54:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 22:59:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 18:59:23 2021
Received: from localhost ([127.0.0.1]:42826 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPvQJ-0001T2-BA
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 18:59:23 -0400
Received: from mail-wm1-f46.google.com ([209.85.128.46]:40952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPvQH-0001Sl-KO
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 18:59:22 -0400
Received: by mail-wm1-f46.google.com with SMTP id
 y124-20020a1c32820000b029010c93864955so5640157wmy.5
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 15:59:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=oDWtWYmrE0lc9qCAVCeKwLRt+4rBPr5SADJCRiirfu4=;
 b=TuN+dpjsIgue0jOXZxzWloAd6s4xmtZfitlLFT3mHi+AbE1laVgWjKZSPeOusSb5GT
 Vws3ex7PQo7oJ0an3pKL8I06aDm3AneUrJfaufwERhJPHFcykFP94Ana9HuAGf2XKPyX
 4jGhunpW1g93anGNjAZ3k2pofzOIOpgfxUOvoih/emkNUM3rKQxZ425BTGvp0jAqSxzB
 TBIBooz7OQq8B7bA1JhwpFjXWVpLOYVaL/xH137nwbiYcvw4d6d5iyfwBN/QYnP856O9
 C3gCi4XtTpWLd9ZiF5wHYchsM4uuiy1wm9F3Xhb5+NXXsPOBpWw0yqG/a+iNqFqa+crR
 w83w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=oDWtWYmrE0lc9qCAVCeKwLRt+4rBPr5SADJCRiirfu4=;
 b=p7Fx4kkGQbdHIv3i4wq0u9ArSpK7qaWXgDpY6dj1s8sSlZdlLR79LcjC1Js7SJa6/D
 R/nQbaRdJVKrTrmDUiR8U1kkxIseGOZyE2nUOU622DvO1eUPqGcjzjhE/u28YVdsyF/4
 IOr2gx8PR53wjO+Wwjg/ly9uBjp2GzDlR1wkgkaXxPN17bQOC/2F1HYyTmjtojVzCT28
 POvdKRMWlQ4cTUgxOfXHYGkHl4S56TSZsE9Ngc+/O5VthUvHRvux9+loRJ1nqXAKdT+Q
 SKDKorG+ObTRtBZJD9CSQP6d820EBUrHddjslmph1Uigw4q8InZBD0oLtdMguA4OMiNM
 HXiw==
X-Gm-Message-State: AOAM530TIZx5bvwk9+jZNzUD6dDzUWiLK7R44I9tTiZuf/i2IuOjMFAZ
 9oHk/xKm3fGhYnh0mO8uMK7Jvg==
X-Google-Smtp-Source: ABdhPJxl0XUcmO85oMMFmGBJQk5ziP6oOcH7FI2lgyeyRV9wPwZpOyTsjzxvRzxJyQrT12E0rMlC3Q==
X-Received: by 2002:a1c:2016:: with SMTP id g22mr14875823wmg.137.1616799555784; 
 Fri, 26 Mar 2021 15:59:15 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id l6sm14695368wrn.3.2021.03.26.15.59.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Mar 2021 15:59:15 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
 <87sg4h21m5.fsf@HIDDEN>
 <SA2PR10MB44747AAF0B1FE7DC3A01D2FEF3619@HIDDEN>
 <87k0pty89m.fsf@HIDDEN>
 <SA2PR10MB44741DCD3F1F1C4174FF4A10F3619@HIDDEN>
Date: Fri, 26 Mar 2021 22:59:13 +0000
In-Reply-To: <SA2PR10MB44741DCD3F1F1C4174FF4A10F3619@HIDDEN>
 (Drew Adams's message of "Fri, 26 Mar 2021 22:40:34 +0000")
Message-ID: <87mtupr072.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 dalanicolai <dalanicolai@HIDDEN>,
 "47368 <at> debbugs.gnu.org" <47368 <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 (-)

Drew Adams <drew.adams@HIDDEN> writes:

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

You seem to have misunderstood my cited text.

The issues you have mentioned have already been acknowledged.  What
remains to be done is decide on how to improve map-elt's interface, so
that its documentation can be updated accordingly.

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

This is already fixed on master, and in version 3.0 of the map.el
package on GNU ELPA: https://elpa.gnu.org/packages/map.html

-- 
Basil




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 22:40:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 18:40:46 2021
Received: from localhost ([127.0.0.1]:42806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPv8I-00010O-8a
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 18:40:46 -0400
Received: from aserp2130.oracle.com ([141.146.126.79]:39296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1lPv8G-00010B-Ba
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 18:40:44 -0400
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== 
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
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
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=
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
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
From: Drew Adams <drew.adams@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: RE: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Topic: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Index: AQHXIn3XLebR0KaHRE2BfaCICihcTqqWy5yQ
Date: Fri, 26 Mar 2021 22:40:34 +0000
Message-ID: <SA2PR10MB44741DCD3F1F1C4174FF4A10F3619@HIDDEN>
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
 <87sg4h21m5.fsf@HIDDEN>
 <SA2PR10MB44747AAF0B1FE7DC3A01D2FEF3619@HIDDEN>
 <87k0pty89m.fsf@HIDDEN>
In-Reply-To: <87k0pty89m.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
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: <SN6PR10MB243020754CA0A214C4831885F3619@HIDDEN>
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: =?us-ascii?Q?cHXfIpyLOgKAMLmH+mEDjG72oax4SrsGEi5X2XFBvd8f5VkJxDEO6Pr/i0JP?=
 =?us-ascii?Q?hGBvEnjgGlfBx6aWesQj/AVD+geHYtCg2x5hglYw8MPStFj2ekPcNjK15e7B?=
 =?us-ascii?Q?rUoK4HGDg03VzpGOjtpp8UXrnUve65hpFsIsHNJRqqvzK9a9g+X/TYvO/M5e?=
 =?us-ascii?Q?QJXheT3iuA9yr07ngrwaDLe/crmgIy7JYkntos4iyPrcXQG+45+qI4YZhzem?=
 =?us-ascii?Q?6PA9hIu3pWoH5Ary4DFHIWb5xVc/Jm2m76bnXYv1+Bm19MDpUXdJc0/WWZ1c?=
 =?us-ascii?Q?JD7+OgJOY2vOH4amsuNqkPHkuWuOoPY/tHac7rNBL84zi+ixv0r/o65p+D2d?=
 =?us-ascii?Q?BZi6dgHO/5L45x6PIv/7YRNVvI3+NpMyQgurWlHL27byx3+oSgILittO94VZ?=
 =?us-ascii?Q?AV7Xi7fPbg9EgaGKWnYNnD8r/SlRzdL7IbcAUhdjWoAm4C5poOqPO569lX6j?=
 =?us-ascii?Q?RuJoGVPfE0fmuyICR1cLyJmvJZ/2nwLPPU1dANBeeyiEcOPikTOollPncQxB?=
 =?us-ascii?Q?ab0H20+CODOScJpYDko6/8JES2T+WRtF64AC1YCCpsa6RaULxn6yGvA0Ew4Y?=
 =?us-ascii?Q?oIojR9k7/jDiMH6jhqL8QAMILUFBw2s88EiwekLTKsO7wNi/bDLKwIe68oCy?=
 =?us-ascii?Q?3hsTw1yynYpAkIpMKsByUA3LTm/epYP9Q1dn/ultwbR4E06GC8uHr6WnC/hP?=
 =?us-ascii?Q?o8OP9lhMEqs/g+o2awSbIwbe1/M4JJvzgsUF5Hai0wGCPwh9b+x7+ykOM7hf?=
 =?us-ascii?Q?4wvlJhz9P/QmoaId9GkEToSv6elEr/CTV3P+WZXAF9v7DuIIlU/FCfxHlBbp?=
 =?us-ascii?Q?GStILwcfUk9ubPVvaOtDDrtJZforpV6O6EtUgwEQaW8yp9MlWUNUkxB1a7Zr?=
 =?us-ascii?Q?aJ3ttni6OXE3GIy2OU9uBy2A1kV5mnNuFf8Ocgp+0+qmEd84NDOB6PxSmwgE?=
 =?us-ascii?Q?XXLdVqtBM7kGJ2/0cifFl+B7GsSgnN40uVwsmit1oi1AeG0n634KhnUfE5I7?=
 =?us-ascii?Q?q/N1UpSDV4XBnr8tDQqdW5mJllKY1GJ4eciT24uy66G+bHbQ41D/V52pD2KG?=
 =?us-ascii?Q?C3k48+rYZdb/jWzitW8V0itEYw1HZOqslirLfo3j4fbnJYlrgxwoQzghYglg?=
 =?us-ascii?Q?Xe6+mluw2IGsx6UkpsoQZTITCDn8i10SohQtD7by1SzYrXRp1IUXI9YNQj58?=
 =?us-ascii?Q?nKy40ApLPp1PuZAoms/Hr1CDhLC9+cTYRJ0cf09s2bDWlTHmEQmHkfjlUuGk?=
 =?us-ascii?Q?DuxF0WanfkbBYuZU6q+dJHKWsthEw331pG+Np+TTozTu1ZxNTwNYEcSGpZ+I?=
 =?us-ascii?Q?A3C+SModRz2s6H02hTFBgwKM?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 dalanicolai <dalanicolai@HIDDEN>,
 "47368 <at> debbugs.gnu.org" <47368 <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 (---)

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




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 20:23:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 16:23:13 2021
Received: from localhost ([127.0.0.1]:42578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPszA-0001pn-Pl
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 16:23:13 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:35383)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPsz7-0001pX-BZ
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 16:23:11 -0400
Received: by mail-wr1-f49.google.com with SMTP id j18so6825809wra.2
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 13:23:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=C2qYFhkCXbO09UM9LNLcCJjDrs1Di+QHMfq2qPYaGzw=;
 b=VxTIN/KojoT1gEq3NGgrq8oi/joi13aPHTgm5vbsQWls6UgJVRcUbAZEy91R42041I
 /w2N5tHWtXES885qqvKCbrqKKnZaYIbes8kFz662VVwpJ8Y5ZcqPVQPpc9PO+Zip3k6v
 vxDLNeIfqGHRqpQ2lElcaj4RG3vgmmlcgGn1qbewtkFaiJ2LClCo2f6mTvCIEIc4/Oo+
 PVE1HzrrWKjch21wYFl5HVPzqjpqT/SqXEzpWtxRp1Bn2WDtsHgB/VB5fzDNUvPq2gdC
 lpKYffUl9JJZBhijfmYpwIppxzQNILE2A/p5YC667BiLaJxVbdlbMLprYExecr8Y+WNm
 20Xg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=C2qYFhkCXbO09UM9LNLcCJjDrs1Di+QHMfq2qPYaGzw=;
 b=SuQ/oTcWqo5GDy78HWuH7cC0UfLlbd0Gbs+orhlGR37P7/uKKyPU7P8+FBTeoze5zf
 bYnGRCAttwbhi0o5piWIjLXVKPQy/BjOHhXX6W/G4yX+h+nZjMP000uNhp3GA+fI0A15
 gQm22X2RQrKomDR1q0XULvv0ME9EGSNlKkhroiq4almKUCH2g9zTTIRzHgSxApzGN/nD
 s2tmPbKHfRmK5AIyjLUOR8yMJAaiTMijfaGWAEGwwAuGVsoW70JJ4MMdQRUY1Qb9LXRt
 obNqYI+GNSTCqSV6ULMtOrh5EFADWVzTRPLxSw4kuXgmQV4oe0ecKzZj71h7iD2o3826
 HzKA==
X-Gm-Message-State: AOAM533IeSwYfN3a+05dnEe4g4CifqdfzyrEwCJHi3QXRWBtpWVOoCKb
 BXkqnBt3ylMAnCTe9NuaolRqnA==
X-Google-Smtp-Source: ABdhPJytvjQrYt0ncylbamAx5CRStYaWK64nFRzkNIrf2/XeIvO46/AyDSqmPCvYHCn/AEpy8J0y5w==
X-Received: by 2002:a05:6000:147:: with SMTP id
 r7mr16369816wrx.25.1616790183488; 
 Fri, 26 Mar 2021 13:23:03 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id n1sm16726271wro.36.2021.03.26.13.23.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Mar 2021 13:23:02 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
 <87sg4h21m5.fsf@HIDDEN>
 <SA2PR10MB44747AAF0B1FE7DC3A01D2FEF3619@HIDDEN>
Date: Fri, 26 Mar 2021 20:23:01 +0000
In-Reply-To: <SA2PR10MB44747AAF0B1FE7DC3A01D2FEF3619@HIDDEN>
 (Drew Adams's message of "Fri, 26 Mar 2021 20:04:44 +0000")
Message-ID: <87k0pty89m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 dalanicolai <dalanicolai@HIDDEN>,
 "47368 <at> debbugs.gnu.org" <47368 <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 (-)

Drew Adams <drew.adams@HIDDEN> writes:

>> >> > This is expected, as alist keys are tested with eq by default.
>> >
>> > Since when?
>> 
>> Since the introduction of map.el in Emacs 25.
>
> The general statement you made, that alist keys are treated with eq by
> default, is false, AFAIK.  That may be true of `map-elt', but it's not
> true in general (AFAIK).

This bug report is about map-elt, not alists in general.

>> > Where?  Expected by whom, and by what code?
>> 
>> By the function being discussed.
>
> Does the doc string of the function being discussed, `map-elt' say
> this?  Does it say anything at all about how keys are compared?

It used to, before the TESTFN argument was deprecated.  But the whole
point of this discussion is that one size doesn't fit all, since map-elt
is a generic function that can be adapted to heterogeneous types and
semantics, both within Emacs core and external packages.

> I have only Emacs 27.1 - the latest release available on MS Windows,
> and there the doc string says NADA about how keys are compared.
> Nothing about what it means for "if KEY is not found".
>
> At the very least, if such is still the case then the doc needs to
> updated to specify how keys are compared, IMHO.
>
> I'm hoping that doc more recent than Emacs 27.1 already takes care of
> this.  You say, for example:
>
>    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.
>
> I don't see (in 27.1) where the doc string warns about
> any such thing.

"TESTFN is deprecated.  Its default depends on the MAP argument."

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

All of these points are already being discussed in this thread.

Patches with improvements are always welcome.

> And why is there this line at the end of the doc string?
>
>   Undocumented
>
> What on earth is that supposed to mean to a reader of
> the `map-elt' doc?

The limitations of and suggestions for improvements to the documentation
generated for generic functions are already discussed elsewhere, and are
not specific to the current issue.

-- 
Basil




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 20:04:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 16:04:57 2021
Received: from localhost ([127.0.0.1]:42564 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPshU-0001O7-OW
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 16:04:57 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:55952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1lPshS-0001NT-V0
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 16:04:56 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12QK4YwV174253;
 Fri, 26 Mar 2021 20:04:49 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=8ldtj8jbRkReE7Z0psg5dYRdB9PvhqhjMMunqy61fvk=;
 b=VC93xhjTa5ZtfepdJgVAuXxl36FPDUBzwbKXgA+zD9zAKxHmxsidzlknlVTRUyMMQnUU
 PC7dI+IcZXOukEsKHUByxXOlZ2zbW7fy7FAQHgvgZ2AVyHxVemBJbG3Cwj4ODTHx4j1q
 AfdnEh8Ujd43Rw9utEHGXbNZhhVcnkHFEC/+UNg/d99Fzwhb5B72oV6XIjX/Qqk5H8Cm
 kY/tG1U/cCegrMPJE5OhqSHphOh3Pf6DZ8vBSKRXoKQbV09uIS+y9yCSDp2c7zKLIwcb
 aCEfuM9pMZ+uET8Q9qwsoEHsP0LRg8IYVwEPs3gfzrpw9STGjHLPtBVRJ0hkF8dtayqd lQ== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2120.oracle.com with ESMTP id 37h13eb9hx-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 26 Mar 2021 20:04:49 +0000
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 12QK1BaO099410;
 Fri, 26 Mar 2021 20:04:48 GMT
Received: from nam12-mw2-obe.outbound.protection.outlook.com
 (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44])
 by userp3030.oracle.com with ESMTP id 37h13y3ynj-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 26 Mar 2021 20:04:48 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=l6upuCY5eOJNTA3UMMJyUscCHlagILT0nf4dBlVNkh86Y3mpFQiY+7mWuDu6DdOmcWQKFfuI+C89VaKsgIAcZBAX5Acd+GltM6wtATDfC9N2LwV/QvF5oPi+5r2BKSloaMgm8hIVODUm3NvcFBlqMqGN/hJa2mK4dEtI/w3+KtKkSHgDh+P7qG3wCpyIM0UwGdY2GjZG+B9DHRkPVRZKBE8xt8FfYNFbAaitvO/vD/8s59guUNf1yAGdYu5SmIPvFMUbqjmKHEZPpzg7Z5QCLnF9cGcGOQl4TexNb6CpMGQB0MC73LzgIxlBna3EV5i1dzvRvvuHCPXayklUBWuhrQ==
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=8ldtj8jbRkReE7Z0psg5dYRdB9PvhqhjMMunqy61fvk=;
 b=e48ECblD0zan4X9H3kyuLHH25pOApBwJ9L5OVPjJUis7qFlNaX/HleBn9TVY4I1Y0blWRzPse700GqntZuVxIhxYifumzvk4HvFepwjh3jwIqJNOkLzIieWy43nzwmMzqyx87CjoVYYm7nOtrkXXrdG5fJN8gr5pCGcdyimS6RJJPPN3zuOXn3F45iK5OSqMPgFLsBAGsM9T7xIkOse4iO+uV0SzYlP1j/n18fpDbGrh6svryNY7ipqXFTOhh1WABj+r4PagtpDxVbyrfdniqXKvkwd58nLYReHGEB6MeWroVdjpjC9wBSt+3v8AfwDSJ+qA/iMhTxwSa1t3+6aPvw==
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=8ldtj8jbRkReE7Z0psg5dYRdB9PvhqhjMMunqy61fvk=;
 b=PkgWlLxpAZ//BkBzrIZDqClKziT7W0/+AHd/PEaWzum0wvS282fbGhuIFJjELaHygqQZ8kfkO/Vgn4T2W+QwvlpAVSzaL8VRx7ELf8Png9T1fAzNhSLJ0m7opQBAa3HAVPuPz7xmSNNJ9aT1GKJviMQGaJeM2O4Iu/p2KNKIJ4M=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SA2PR10MB4475.namprd10.prod.outlook.com (2603:10b6:806:118::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Fri, 26 Mar
 2021 20:04:44 +0000
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
 20:04:44 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: RE: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Topic: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Index: AQHXInCIziN40bI+Vk20GBwT06mSG6qWrr4w
Date: Fri, 26 Mar 2021 20:04:44 +0000
Message-ID: <SA2PR10MB44747AAF0B1FE7DC3A01D2FEF3619@HIDDEN>
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
 <87sg4h21m5.fsf@HIDDEN>
In-Reply-To: <87sg4h21m5.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
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: a2af2eae-ecac-49ec-bfe4-08d8f0926679
x-ms-traffictypediagnostic: SA2PR10MB4475:
x-microsoft-antispam-prvs: <SA2PR10MB4475790D4891F3BC0679B12BF3619@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: LQH9eKGDEpp38rylEyeHsroy4uZUiGPaiy3Y+39Ju1QOD2682TD3W3/4DOurwE2aJ2LWYAFQPv5xd6jAL0iDfsRfEVTOikC6WdM8wRWL7sxgHZNnfde5iQPr7yA7pNEtWW55Ui+Z5YpHkRU/VmxBqfBPm//2xu5nn/ycbkBRY92ueGi1WtzCinZT04FaA6KGN19008CDU/IJ9s/7RqlFSIzOW6vZeNu55o20oux9x9qzFTo0xBqunzT4r/3GTOVV49elH/x+7StoSfpzOKY73Wg+iQAgSfT/dlJV9FdUYkgfNLzWAme6/QYStlyvhh/1xshI81CdYU6tlOwQUj9vwFiybvTMkPjTBQMz5EZGcA/js7TRsFt6z70anIkZIdfuSyHKb1g6rm5YeOdvgSBJDUt4zUzvI36QYlLjsaacmZXDlzeB3cPolfS4QsmsU0c7Erm9tQWWtI6nkr6SuGrpwUThjqbgD0Un0j4XzexJ67uHOtx3jVoSc+se5W7pRNo9zVCKNTgRsy+fc6oABGJD+MqLVy3ybduCXxfYGjEFEWGryqAp6y/WOTh59iPPmT/3fG326wXJCoMtqlPBYEgJX6VQrdnOnmMZjgyW5LxLK/qzRyGRDJ5WxZ/qPgVJewhLlpbPU/eusCNWbTTUNIHgr9JWNjhsYZR5kyMNfjBx9mk=
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:(346002)(376002)(396003)(366004)(39860400002)(136003)(52536014)(9686003)(316002)(296002)(86362001)(2906002)(33656002)(5660300002)(71200400001)(6506007)(8676002)(55016002)(38100700001)(186003)(83380400001)(66946007)(44832011)(8936002)(64756008)(76116006)(66446008)(478600001)(4326008)(7696005)(66556008)(26005)(54906003)(66476007)(6916009);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?tJIFUrkSYbK7BejdazzghP/mwKN/WXnjeG7O91jZuHP60C5P6Xja5lN2r58u?=
 =?us-ascii?Q?+XiyE1AhfoKdQgR9VZgwCy4fm/tF7wepUxQ9u83YXPXpwNqbmmqzPhwxuhor?=
 =?us-ascii?Q?gVBCTFI/Vl88DXzw+LQtYDYfhdOqZ0Yfm5h0GJvlhm+xdCPp2GGgtuyBvghs?=
 =?us-ascii?Q?srCbmtnB2e5J4VkODHUVKeldoM1Yd0JKxBnSzPOttCYVOm5AmWDju3cUHCXx?=
 =?us-ascii?Q?0zGDzyfNfePJ9d66jlVwQ7S6Bs6mDhtEpxMbUzzWcvQS4/gDmjElMqC113A4?=
 =?us-ascii?Q?0gOIxLVntZddEuUaVZcJ+Njj78E0BhJAjO3NGUmL8QehzYbNlE50B9zy5Ow7?=
 =?us-ascii?Q?A+5ls9KSWaL1Ge8nNozCCfDuDV8bHilQs+T3ihzFT6g+Ia4TpbaA8ntN8GCb?=
 =?us-ascii?Q?YAOYIc5HPWOaiJOcvXSWVZjg+xa8h6rjEITn8vJnmNxpeWT1hTxeeaQe0ChC?=
 =?us-ascii?Q?bOzikF9tlm4lLnDmF8vgz1Xjz2RyOOwEsOGkeWQaYw3h/28Q6p961h0rWi2d?=
 =?us-ascii?Q?Iy2gX1uckWZT9R961vYeHXzaMMaihLbQX5tIIo8vKcCE3XnPqh5GxXak7jt5?=
 =?us-ascii?Q?3LkAWacyV6FgoIIXx6m8ZkAx12Nm6vBHs0OTedXQCFdeKuQET9uEMfSBOKMt?=
 =?us-ascii?Q?GSbdcUuTl0bcbOKos6ydRXH97O7AqRGl9azKWPO9JUdpFOG/5MAKI+FihoXA?=
 =?us-ascii?Q?PIZCmDCEVlrnweBebpGIjWUPnwRO+04Ba1DwVgEZhajVf5xB3jwA6ZaOR/1L?=
 =?us-ascii?Q?ZyqHTHAGxr57V+xnoNlBHbtaaF3k61MB8H7mcHF22b2KQmE6IG8D2ymkX3uQ?=
 =?us-ascii?Q?ICizbJnIukvE6DEKhv2jzKs+Fa9YRcREykcEGm6QURrORxSNyI+BOj+CZMe4?=
 =?us-ascii?Q?xbtyEOm1th66bRCyXU9d1CLndLCT6Z2GB97PkGmKmjRdgKmRBUMGHTI3F8Nt?=
 =?us-ascii?Q?IrF427zKfrzZP9UJDweGp9KmRFHHjl5KtuKXPjybT5Ge0cwps2ahpUWVwJdq?=
 =?us-ascii?Q?YMXAD00JkizFSXtDBq4zT9VURZgGOTlb/d6WG+BvAH6ot6dhCT257dmCj4yB?=
 =?us-ascii?Q?Qv+9uo2tRYW79E7x9LgYeTlzSrZnrh1e4o4P3mELwlFbixFd8kE/1ZCUsN7r?=
 =?us-ascii?Q?ixLXL7GgmhiQmbPRs5ijkGWsXx9j6WyJAjEo7lfhIsB7KaJYwlBvfDRmidFp?=
 =?us-ascii?Q?bSDlfMBLPf17Kv68S52PH8n4bFa2Z6BirvkoZvdEpaeAqXaTfCYI5FXcKUwU?=
 =?us-ascii?Q?EB6SygDg/6/4akiNuO7mAHTfIbMC8eDGTJQaFCCIyAVdCo8MjFWG8dGZ2fVm?=
 =?us-ascii?Q?VAw=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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: a2af2eae-ecac-49ec-bfe4-08d8f0926679
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2021 20:04:44.6807 (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: wkzyBZCNCO5+Mvan1tLwYYyT0rmQCNHoCJ1/YamAak4dfi/5NROWrLzRvMyxKeTvz7fSM+8CFgIEmT9p7qApTA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4475
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9935
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 mlxscore=0 bulkscore=0
 spamscore=0 mlxlogscore=961 suspectscore=0 adultscore=0 phishscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103250000
 definitions=main-2103260149
X-Proofpoint-ORIG-GUID: zqcpBo8KilbuB-9tSRvI_I45Vz3vvzB4
X-Proofpoint-GUID: zqcpBo8KilbuB-9tSRvI_I45Vz3vvzB4
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9935
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015
 lowpriorityscore=0
 bulkscore=0 malwarescore=0 priorityscore=1501 suspectscore=0
 impostorscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 adultscore=0
 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2103250000 definitions=main-2103260149
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 dalanicolai <dalanicolai@HIDDEN>,
 "47368 <at> debbugs.gnu.org" <47368 <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 (---)

> >> > This is expected, as alist keys are tested with eq by default.
> >
> > Since when?
>=20
> Since the introduction of map.el in Emacs 25.

The general statement you made, that alist keys are treated with eq by defa=
ult, is false, AFAIK.  That may be true of `map-elt', but it's not true in =
general (AFAIK).

> > Where?  Expected by whom, and by what code?
>=20
> By the function being discussed.

Does the doc string of the function being discussed, `map-elt' say this?  D=
oes it say anything at all about how keys are compared?

I have only Emacs 27.1 - the latest release available on MS Windows, and th=
ere the doc string says NADA about how keys are compared.  Nothing about wh=
at it means for "if KEY is not found".

At the very least, if such is still the case then the doc needs to updated =
to specify how keys are compared, IMHO.

I'm hoping that doc more recent than Emacs 27.1 already takes care of this.=
  You say, for example:

   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.

I don't see (in 27.1) where the doc string warns about
any such thing.  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.

And why is there this line at the end of the doc string?

  Undocumented

What on earth is that supposed to mean to a reader of
the `map-elt' doc?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47368; Package emacs. Full text available.
bug Marked as found in versions 27.1. Request was from "Basil L. Contovounesios" <contovob@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 18:59:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 14:59:09 2021
Received: from localhost ([127.0.0.1]:42497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPrfa-00064j-12
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:59:09 -0400
Received: from mail-wm1-f52.google.com ([209.85.128.52]:34731)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPrfX-00064W-UC
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:58:52 -0400
Received: by mail-wm1-f52.google.com with SMTP id
 n11-20020a05600c4f8bb029010e5cf86347so6376491wmq.1
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 11:58:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=O4X/0hmX/J92Q79qHmi9UXZxvgc4EEmTL2lxnXIRnNU=;
 b=WXfinnHImrBUwQdsR9ClwsjfcoUraMq6sZW/kATsUhKvmIGwl+u+T7j+vWFcpIdJao
 cNmvedzmtYFC45xfHc4TKeYsK4tRPPS1GZnV755KAXvXV+pvJwZYuhaJND5jvuK9F3U/
 nSSa+kyQbyzLDTcTadMSiJvXaZLYRtfO93YBqy14ZcEaCOYP1NCh8xhiVTepNbhNYBKK
 J/RWC0xW67dbhDGBnXwT3v7WDszX818J0Z4WZmyW7E45Z7gRP0+WPZBbevGxz6n6atA7
 9IfP5LxNiZej82DAgD7O6E+jv0npGcLqwI/wv5MRW49arGcq6ZnHjwvtwmFu83lYes07
 uL/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=O4X/0hmX/J92Q79qHmi9UXZxvgc4EEmTL2lxnXIRnNU=;
 b=r+EXB6ah40Pb6lU2od4GUsCPU9dsqEcYZY7oRxasJMUMs+ojpuomfnNfVaPDuO/u2b
 6gzDsi+KH4A+WY60XiiyqxkZqCH2AuKkVYrmRm9PxOU/eKgkdFFbdz5l9KojEPfmgNkq
 fR4MZCtMWwV03u7bDS6cTxn6rzVSC01BukK0IKWkTnGO8/1o3NsaHyR4RnlXgu6MeMJX
 mYQjkMdjsBDI/TlgHMX60l7MkXTGJlEjgeft1HQmXdUPnsy2vBOeX7Q5Rq0w0gVx/Q9F
 hvh9NGhybInjLYBdTQGdRLCLS3skUK5zcukQJX3kiLErXvT8xgG7jY69aDrRBGXjs92U
 fIWQ==
X-Gm-Message-State: AOAM530hbqkC74/rCp5mlrioy9bNl3fB+Jfbc8iiIud77o5wbzWsPVYj
 GpYdd5mLkSW5dnpeTC4RKKegMw==
X-Google-Smtp-Source: ABdhPJxtPapMGc6nmwA5KO4HSbBcN/fTdxElvBE1Fe5CV0yogJN38LYlsyfcKeoR9nboFc2BfDRoaw==
X-Received: by 2002:a1c:1dd4:: with SMTP id d203mr14266488wmd.83.1616785126182; 
 Fri, 26 Mar 2021 11:58:46 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id m11sm15127478wri.44.2021.03.26.11.58.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Mar 2021 11:58:45 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
Date: Fri, 26 Mar 2021 18:58:44 +0000
In-Reply-To: <87lfacvtwt.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 25
 Mar 2021 03:39:14 +0100")
Message-ID: <87pmzlzqqj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: dalanicolai <dalanicolai@HIDDEN>, 47368 <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 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> "Basil L. Contovounesios" <contovob@HIDDEN> writes:
>
>> dalanicolai <dalanicolai@HIDDEN> writes:
>>
>> > The docstring of the map-elt function from the map.el package (version
>> > 3.0) mentions that TESTFN is deprecated because "its default depends on
>> > the MAP argument". However when I try e.g.
>> >
>> > (map-elt '(("A1" . 3)) "A1")
>> >
>> > it returns nil.
>>
>> This is expected, as alist keys are tested with eq by default.
>>
>> 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.
>
> Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
> not obvious that "alist keys are tested with eq by default".  It's the
> default for `alist-get', ok, which is used by the implementation, but
> not everybody will know that.  I would add a sentence about that.

There used to be such a sentence until the argument was deprecated.
I agree that whatever we decide on should be made clear.

-- 
Basil




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 18:57:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 14:57:23 2021
Received: from localhost ([127.0.0.1]:42492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPre7-00062W-KW
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:57:23 -0400
Received: from mail-wr1-f53.google.com ([209.85.221.53]:47035)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPre5-00062H-AE
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:57:22 -0400
Received: by mail-wr1-f53.google.com with SMTP id v4so6581931wrp.13
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 11:57:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=XYwwPUgb8+OZnrvyMX47TqlaMFLoXwKFpK+P0lg8En8=;
 b=IWm+Q9K4dT+giX+8Q1GABxT7iz7dWxO5chYKplQNBO8Htq6iblWr6VdXKn/unoZRk+
 WWCoApbr7mx/lZ7AAkSdByYAUsMXh/dq1XUiXp9HtDh8KQt8i10KMnTFXldUyVHd+9DW
 1A9onr/4WtTPpkyMVtxtCOaf3TYe8YGs3fU4ocp3GOWBuybG9FKuZ0yJgAm7i7lVlkcn
 ulh3aaeww2HRhpR5e6sNCkTikJiTHD1qZMj0DEDIPE6S4+E2zz0N82qfvFmaL/Oex3y1
 oFL4MF6TTeK0acjDN9WGhOsvvS2w8ADH1ol/La3/PVxT+y7mGfYDw3SFfBzVKyzJSjcP
 SK4Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=XYwwPUgb8+OZnrvyMX47TqlaMFLoXwKFpK+P0lg8En8=;
 b=qSPrEXSOXnisvPnBaBgQmIE1Ow1R7hnf+9h0M+kW58j96XVVVFUO0sq0/FjimCCeOp
 wcjXQluPzAoyE7Ma9SO+NN71JlxXXZjvp2I5cmndSmOkWWnZzHmDSn1cLAAcCHflS6/L
 2AOY07RV+/JvVOY/6BhuJLacxnwHRzMSL0lZG7e83DV0EyAB7PsvoGnEt35OWxGn7t8l
 G08ZkOHxpWrVkTxOVXEgGqmjFKCxuMv+HGntnZ8q7RfhOgsnhFrvMQagxR0bVDYluBZ0
 ZJLNkremRJpyKX1DG1rtyJCNot9ZQreAfbfb5KOHRFMUOqD/+J8Cbw0NBfhH5Kk3CObk
 14wA==
X-Gm-Message-State: AOAM530Ze5z/bgqRVGZo7krQ9sYuRW5I8iAlMTWwxB7mBsnMshtt/ONA
 xgqKWCBwizJHRj+vVaRWMJwLXg==
X-Google-Smtp-Source: ABdhPJx/P8TGgE3e7S19qYeO1/zy4S1SJOl25lvClG2u0bGGW+/SY/AWjMinSVkLDuhoHYe9BWEn5w==
X-Received: by 2002:adf:ef4c:: with SMTP id c12mr16195165wrp.112.1616785035481; 
 Fri, 26 Mar 2021 11:57:15 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id h14sm16230400wrq.45.2021.03.26.11.57.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Mar 2021 11:57:14 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <87blb6h8f2.fsf@HIDDEN> <jwvr1k26nzg.fsf-monnier+emacs@HIDDEN>
Date: Fri, 26 Mar 2021 18:57:13 +0000
In-Reply-To: <jwvr1k26nzg.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 26 Mar 2021 09:31:27 -0400")
Message-ID: <87y2e9zqt2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 47368 <at> debbugs.gnu.org,
 dalanicolai <dalanicolai@HIDDEN>, Nicolas Petton <nico@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 (-)

Stefan Monnier <monnier@HIDDEN> writes:

>> What's a good way to solve this?  Obviously the map abstraction doesn't
>> fit so super well for alists because unlike the other map type alists
>> don't know "their" test function.  But disallowing alists that don't
>> test with `eq' seems an unnecessary restriction.  Can we say that the
>> argument is allowed only for alists?
>
> How 'bout always using `equal`?

No objections here.  CCing Nicolas in case he has any comments.

Just some code archaeology for more context:

- Pre-Emacs-25 map-elt used assoc.
- Emacs 25 map-elt used alist-get without TESTFN.
- Emacs 26 map-elt gained TESTFN at the same time that alist-get did,
  in https://bugs.gnu.org/27584.
- Emacs 27 deprecated map-elt's TESTFN.

-- 
Basil




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 18:47:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 14:47:57 2021
Received: from localhost ([127.0.0.1]:42474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPrUz-0005oj-6M
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:47:57 -0400
Received: from mail-wr1-f42.google.com ([209.85.221.42]:34417)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPrUw-0005oV-AB
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 14:47:55 -0400
Received: by mail-wr1-f42.google.com with SMTP id j7so6625253wrd.1
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 11:47:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=J2Hf2uzCgF+Sku1PWjwUEw+Tdghb0oqzUBycCUYz4KY=;
 b=f9bt9WnS8PpxsAVhE+6gVhUjyA4yC92Kak1MlPlbepDPw9pN67SET7iYdlkorzo7e3
 z9mrcALRkvhKGkqWsqgGkJ28lFS4H8WEl1BVxoqSWEQASeov8N3C956Tw9ASJgEmoh8f
 LdCNp200XPHwy4veqUjUdxa5zryE5/sqE8L/rrfMGBHokNf0H40vT6lXch6LhODhJPTO
 tVNeqklhRyBEFwQnek/9PRvIxMpg1EXs8QKXNwAfmKEuFM4uv0zfGOKYZfJzg8UGBtVc
 8MOzd+4ouuDyxC2hXnJQZjzBDsttUnL1UaJzunRIy5HZ7xE/36m5vVD37bRK3hCesMGm
 ZCgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=J2Hf2uzCgF+Sku1PWjwUEw+Tdghb0oqzUBycCUYz4KY=;
 b=FodEeqvnOMWyXHXd2fn8FlC2AGNfY9Q62O8cjJH/2OwC5hQMblNurWWZG7D2x0ih1A
 SNYE7CwUvaGohE8B/LkrXWJotXo3Rs4hytszhbKEVjhn4/MGTuD1bJZXuGaejECDr6BK
 N0L67PbFkhERIwgLnygUtfnYdACiLEByc0uKpytNZ4PsqWVsR7GoonzvF9DJV3yldmNC
 Iej1G9dEAk63XGKP5K5kGQjJySbrDkq6ZnbJ9QZy+bYvpevbGJkLaWygNbSRGvgxmXrI
 Vhy8npQvmLvUtjUVV09JiUNLI6H5s3ZjI1xzYllnQDUJ1cQIwB/Vk+juYGMYThiK+UhE
 /Wyw==
X-Gm-Message-State: AOAM532hnr6Ht1fq6leUgULBOEFQSuYnKJ7zKH82fxnxW9IzlrU6LakF
 0nrPNDnmn1apC/ejhzulPgWt/Q==
X-Google-Smtp-Source: ABdhPJyknMMjG8/WEWRfTschkvCUgU9QyCVIvlMlm+4PGl1TvNV4K3Paz81Glg2bThm1P5AdKi6HUQ==
X-Received: by 2002:adf:e412:: with SMTP id g18mr16461547wrm.159.1616784468296; 
 Fri, 26 Mar 2021 11:47:48 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id c6sm13742218wri.32.2021.03.26.11.47.47
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Mar 2021 11:47:47 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
Date: Fri, 26 Mar 2021 18:47:46 +0000
In-Reply-To: <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
 (Drew Adams's message of "Thu, 25 Mar 2021 15:33:34 +0000")
Message-ID: <87sg4h21m5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 dalanicolai <dalanicolai@HIDDEN>, 47368 <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 (-)

[ BTW, your MUA seems to have mangled the email subject, and I received
  the mail twice.]

Drew Adams <drew.adams@HIDDEN> writes:

>> > This is expected, as alist keys are tested with eq by default.
>
> Since when?

Since the introduction of map.el in Emacs 25.

> Where?  Expected by whom, and by what code?

By the function being discussed.

-- 
Basil




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 15:32:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 11:32:59 2021
Received: from localhost ([127.0.0.1]:42252 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPoSJ-0007Nv-0b
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 11:32:59 -0400
Received: from mail-vk1-f169.google.com ([209.85.221.169]:39571)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1lPoSG-0007Ng-UA
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 11:32:58 -0400
Received: by mail-vk1-f169.google.com with SMTP id 11so1272646vkx.6
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 08:32:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=fZw37DPGfc0eJFaULCQ96DNnmTQ5E9z5qzMsD3l2bcc=;
 b=sYIOKypbWUWZdcG8vAYP18PT9gkdEhVZD+MWFqdMqAcLqDsq/Y0qkjVJ44kaTVK8R3
 M7ZXoTfqoWvoeppUUC+W94Hff5av+hMOLBFki1cRM0ywBP20uuFylGSkWOwK3hl25gG7
 JBgYY4pZ4CQkcgQA931agFz0YjkzwEge1C5LfcXlUctje/R31RMGZAyEb2su9nTd/nYR
 lR40zok4TMKcVhRi/Va1SARIwm/s9EeCTSkc9sYxgIXAA/1rRUL3G4PnsbCnrRiMc2VX
 ZJjy8vmoOO1DhdIigVJ2QwMiGiN6Cm6kLqwNA4IH8Lw95qVf9uqEd3x3G8Sck2cR4YVd
 wPIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=fZw37DPGfc0eJFaULCQ96DNnmTQ5E9z5qzMsD3l2bcc=;
 b=TRUfFQpmf8qJspLBRn+QEqrPkQP2hthTs6v/hvUjosU1JrzUPizlVjgFx32bAHfT7H
 pVAJqaRm4W98Ntht+aOldkLXcj0p216RE7VpXGQtYSIxPaK95ithYZ/cm1nO/NWvcvQy
 hZJpJ+1wp+qf+YG2HO1re1I7QWoM5/Du2CgHSFzw5X0BYdFtVUFhcen30a30Dak3IueV
 9zsaO8TNELR/xxK+cWOzNAyCtW6rIJvsjMYNJ4T6W1ggwVbUlgVTMWIDuh0thiDzpGul
 G/1I2BdcEuJ85MYg9jRPQhKchNJVOObG6/IQ1r0X0M9SktjRs3Hpc0FbDZrCXkQO++6Y
 nc9A==
X-Gm-Message-State: AOAM532/z7JN1IRyYhcq7tAyHFx6r9STmJ/sypKilI/QYZhNqq4WuO/N
 tVjcKBi1b0GqlkwrJuNqpgJi8Pkcv6FYvARuMsY=
X-Google-Smtp-Source: ABdhPJxMI4QS5x8zGqxm0nH+JZ1ayQYQixsTJFdjc/Au0QJDzuIKQvpWYoDDMM3Ehj/vX4Ws7MLIlxX3UoanVucb7WU=
X-Received: by 2002:a1f:ae94:: with SMTP id x142mr8669996vke.12.1616772771241; 
 Fri, 26 Mar 2021 08:32:51 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN> <87blb6h8f2.fsf@HIDDEN>
 <jwvr1k26nzg.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvr1k26nzg.fsf-monnier+emacs@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Fri, 26 Mar 2021 16:32:39 +0100
Message-ID: <CACJP=3ktr30cVimmHOR27hoV8WBTF-AsrC5oe=P=sG1jKYJFCQ@HIDDEN>
Subject: Re: bug#47368: 28.0.50;
 map-elt returns nil without "deprecated" TESTFN
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b6622d05be723e5d"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 "Basil L. Contovounesios" <contovob@HIDDEN>, 47368 <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 (-)

--000000000000b6622d05be723e5d
Content-Type: text/plain; charset="UTF-8"

Well, as a hobbyist programmer, this makes more sense to me anyway. If
users don't want the behavior of using `equal` then they could just as well
use `alist-get`.

I hope you don't mind if I write down some thoughts (and macro's) I have on
my mind.
Personally, I think it would be great for growing the community, if
emacs-lisp got more approachable (in the direction of python).
I actually got here because, as an exercise, I was trying to implement Norvig's
sudoku solver <https://norvig.com/sudoku.html> in emacs-lisp, which was a
quite frustrating exercise (this is no complaint, but just a fact).
I think it would be great if emacs-lisp could look, and become readable and
usable, more like that (in which map.el and seq.el are doing a very nice
job of course). So that emacs-lisp could actually
become a nice and friendly teaching language, which is equally fun to
script in as in python.

Actually, I got the feeling that it would be nice to have
list-comprehension like syntax also. Therefore, I tried to create some
general `array` and `table` macro's here
<https://github.com/dalanicolai/list-factory/blob/main/list-factory.el>
(which is my first macro exercise ever).
As it is just an exercise it is undocumented, but you can very easily get
the idea from looking at the (commented out) tests at the bottom of that
file. Also, from looking at map.el, I assume I should probably
implement it using cl-defgeneric.

Haha... sorry for the elaborate answer.  You can neglect most of this
message, but maybe someone is interested and shares some of these ideas (or
likes the idea of these macro's). I just couldn't resist to share these
thoughts...

--000000000000b6622d05be723e5d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Well, as a hobbyist programmer, this makes more sense=
 to me anyway. If users don&#39;t want the behavior of using `equal` then t=
hey could just  as well use `alist-get`.</div><div><br></div><div>I hope yo=
u don&#39;t mind if I write down some thoughts (and macro&#39;s) I have on =
my mind.<br></div><div>Personally, I think it would be great for growing th=
e community, if emacs-lisp got more approachable (in the direction of pytho=
n).</div><div>I actually got here because, as an exercise, I was trying to =
implement <a href=3D"https://norvig.com/sudoku.html">Norvig&#39;s sudoku so=
lver</a> in emacs-lisp, which was a quite frustrating exercise (this is no =
complaint, but just a fact).</div><div>I think it would be great if emacs-l=
isp could look, and become readable and usable, more like that (in which ma=
p.el and seq.el are doing a very nice job of course). So that emacs-lisp co=
uld actually</div><div> become a nice and friendly teaching language, which=
 is equally fun to script in as in python.<br></div><div><br></div><div>Act=
ually, I got the feeling that it would be nice to have list-comprehension l=
ike syntax also. Therefore, I tried to create some general `array` and `tab=
le` macro&#39;s <a href=3D"https://github.com/dalanicolai/list-factory/blob=
/main/list-factory.el">here</a> (which is my first macro exercise ever).</d=
iv><div>As it is just an exercise it is undocumented, but you can very easi=
ly get the idea from looking at the (commented out) tests at the bottom of =
that file. Also, from looking at map.el, I assume I should probably</div><d=
iv> implement it using cl-defgeneric.<br></div><div><br></div><div>Haha... =
sorry for the elaborate answer.=C2=A0 You can neglect most of this message,=
 but maybe someone is interested and shares some of these ideas (or likes t=
he idea of these macro&#39;s). I just couldn&#39;t resist to share these th=
oughts...<br></div></div>

--000000000000b6622d05be723e5d--




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 13:31:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 09:31:37 2021
Received: from localhost ([127.0.0.1]:40624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPmYr-0003vS-H1
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 09:31:37 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52999)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1lPmYp-0003vD-IG
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 09:31:36 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4A3174408E9;
 Fri, 26 Mar 2021 09:31:30 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 152C8440610;
 Fri, 26 Mar 2021 09:31:29 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1616765489;
 bh=YUp6S7v+af1+mAyedEyFcp1CCnHNUDhaKQRFLE+sTBg=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=aEm5vmwPTxCV127lQ+Jv6OKyPkKx2BtqkpimbvSiiQTt1Oe9PewMnDgZxyZ/+XgJ8
 BhPappUSdp82ickp7IMEJj4xLx1aAzI8KP3UVNBuiK1E6d1Tf3YOI3H9VCqnRIrzMW
 auYlg9y0IUnEB5Uhypw8OLRjGmBfe5l+4QLVraEmVGqnQn8UNxxgmuduCAw0CwKu/c
 BrNPlsJMCL0TTKyLVPsazqtkI7XqOZuE+yig1hhc3LHIe9wyS35wZhlp8ffRA3dVSW
 hthPSpItCHzjlqZqncaE4Cj+F6ieI+tTOgNqvMfZgaHqGlBC+mtUrCp4GenH+sS1ju
 BEq2q7rhacLLw==
Received: from alfajor (unknown [216.154.43.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7E517120313;
 Fri, 26 Mar 2021 09:31:28 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
Message-ID: <jwvr1k26nzg.fsf-monnier+emacs@HIDDEN>
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
 <87blb6h8f2.fsf@HIDDEN>
Date: Fri, 26 Mar 2021 09:31:27 -0400
In-Reply-To: <87blb6h8f2.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 26
 Mar 2021 04:59:29 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
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.104 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
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47368
Cc: "Basil L.
 Contovounesios" <contovob@HIDDEN>, dalanicolai <dalanicolai@HIDDEN>,
 47368 <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 (---)

> What's a good way to solve this?  Obviously the map abstraction doesn't
> fit so super well for alists because unlike the other map type alists
> don't know "their" test function.  But disallowing alists that don't
> test with `eq' seems an unnecessary restriction.  Can we say that the
> argument is allowed only for alists?

How 'bout always using `equal`?


        Stefan





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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 07:38:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 03:38:43 2021
Received: from localhost ([127.0.0.1]:40259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPh3K-0001Pg-OA
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 03:38:43 -0400
Received: from mail-vs1-f49.google.com ([209.85.217.49]:42577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1lPh3J-0001PT-RK
 for 47368 <at> debbugs.gnu.org; Fri, 26 Mar 2021 03:38:42 -0400
Received: by mail-vs1-f49.google.com with SMTP id b5so2240481vsl.9
 for <47368 <at> debbugs.gnu.org>; Fri, 26 Mar 2021 00:38:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=W/GSYOtZ32UuETsUaHDNh7p3PJZmV1k+b2mI4L0SES4=;
 b=UD+FlKnelnAHwxSvf/N9Y2dKOw4q3IJc0Vx4pdweOTHUSjx143atzhQ/3TvFMd3toK
 RePwGWhyA3gn35WFek2uXkBdIRHzzqpsy2HJYz3P/zBA9ulz2TXlyxI+kS/dT0X9NYiz
 GL1HDOdIBVSCkHyxqxJitpuh0qf+IdZoH4AmuVF4Gj/JBCqdA1AVBs8sT1JVNthwrcoD
 r+lU2KRIzRcmYtjSP1Wwt9sh4szyczMrxQSAfxmLbv0PLLfyMtdHghTmt/vZhZBnWLlz
 AP0mk6cw57TXMv2s5chz6WJ3s9XTdrTjB/d0w7LqHHdFfOsIME1CG3jmFo8Q1NfvJgdW
 TafA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=W/GSYOtZ32UuETsUaHDNh7p3PJZmV1k+b2mI4L0SES4=;
 b=UL2apiTHqBcSzF2Vs0ffB1jQGj+OvVnBQl71Qb7Dc8udjDYfUPRo1VfIzkx6NikLDh
 vtsOAkeKSFl6LtmZyYzF2IVDJUnOx58ZQyCKT62QVIT4GrfJR7DS4R/dJ3XkP+lk505A
 gJYlZXZ9w+BM0lmCDwV4zucVSHW5MHFei7ipkOkEvs51PrGZ+OQaQ/Pa9edb0fT4QEe7
 TDHiCYNxurK4MzBpKYBwxCC3aeB4Ls/qUfXCkaPKDXJwXlDIWCIwaPXfvUolU0f7is4D
 JGx+q8njfms31ws/GZAFQWUA4iMxvHAb1s9XlI/yPYxcypZ+VPb97ChLOMXsZrS9rRwa
 4xJA==
X-Gm-Message-State: AOAM5324d/5ieAKVIVE5hhG4Z7eEqCqiI2uMWpK0K3kMB/V8+kdOn9Qu
 vigmRQ51ORs0HS8SBie1vkHjIjPctYBvWR+PUEY=
X-Google-Smtp-Source: ABdhPJwagcIQNYtd/a605vzyMts0AU8iN3RuGhMMndAg6ZfWk8myPrGPcxktafP064CbGzyZ69peQBCPfvlHSLwokqg=
X-Received: by 2002:a67:c209:: with SMTP id i9mr436403vsj.8.1616744315988;
 Fri, 26 Mar 2021 00:38:35 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN> <87blb6h8f2.fsf@HIDDEN>
In-Reply-To: <87blb6h8f2.fsf@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Fri, 26 Mar 2021 08:38:24 +0100
Message-ID: <CACJP=3=0fQcMb1UGXP+uzwU7ujCaX2=9_s-1o-6r6D_Y_ARQNg@HIDDEN>
Subject: Re: bug#47368: 28.0.50;
 map-elt returns nil without "deprecated" TESTFN
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000a5b12905be6b9e6e"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: "Basil L. Contovounesios" <contovob@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Drew Adams <drew.adams@HIDDEN>,
 47368 <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 (-)

--000000000000a5b12905be6b9e6e
Content-Type: text/plain; charset="UTF-8"

You probably already noticed it, but I only notice just now that the TESTFN
option also has been removed from the calling convention with
`(advertised-calling-convention (map key &optional default) "27.1")`. (Just
to add to my previous answer)

On Fri, 26 Mar 2021 at 04:59, Michael Heerdegen <michael_heerdegen@HIDDEN>
wrote:

> Hi Stefan,
>
> we are discussing here the limitation for `map-elt' calls with alists
> caused by deprecating the TESTFN argument (done by you a while ago).
>
> What's a good way to solve this?  Obviously the map abstraction doesn't
> fit so super well for alists because unlike the other map type alists
> don't know "their" test function.  But disallowing alists that don't
> test with `eq' seems an unnecessary restriction.  Can we say that the
> argument is allowed only for alists?
>
> Regards,
>
> Michael.
>
>
> I <michael_heerdegen@HIDDEN> wrote:
>
> > > > The docstring of the map-elt function from the map.el package
> (version
> > > > 3.0) mentions that TESTFN is deprecated because "its default depends
> on
> > > > the MAP argument". However when I try e.g.
> > > >
> > > > (map-elt '(("A1" . 3)) "A1")
> > > >
> > > > it returns nil.
> > >
> > > This is expected, as alist keys are tested with eq by default.
> > >
> > > 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.
> >
> > Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
> > not obvious that "alist keys are tested with eq by default".  It's the
> > default for `alist-get', ok, which is used by the implementation, but
> > not everybody will know that.  I would add a sentence about that.
>
>

--000000000000a5b12905be6b9e6e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>You probably already noticed it, but I only notice ju=
st now that the TESTFN option also has been removed from the calling conven=
tion with</div><div> `(advertised-calling-convention (map key &amp;optional=
 default) &quot;27.1&quot;)`. (Just to add to my previous answer)<br></div>=
</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">=
On Fri, 26 Mar 2021 at 04:59, Michael Heerdegen &lt;<a href=3D"mailto:micha=
el_heerdegen@HIDDEN">michael_heerdegen@HIDDEN</a>&gt; wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:=
1px solid rgb(204,204,204);padding-left:1ex">Hi Stefan,<br>
<br>
we are discussing here the limitation for `map-elt&#39; calls with alists<b=
r>
caused by deprecating the TESTFN argument (done by you a while ago).<br>
<br>
What&#39;s a good way to solve this?=C2=A0 Obviously the map abstraction do=
esn&#39;t<br>
fit so super well for alists because unlike the other map type alists<br>
don&#39;t know &quot;their&quot; test function.=C2=A0 But disallowing alist=
s that don&#39;t<br>
test with `eq&#39; seems an unnecessary restriction.=C2=A0 Can we say that =
the<br>
argument is allowed only for alists?<br>
<br>
Regards,<br>
<br>
Michael.<br>
<br>
<br>
I &lt;<a href=3D"mailto:michael_heerdegen@HIDDEN" target=3D"_blank">michael=
_heerdegen@HIDDEN</a>&gt; wrote:<br>
<br>
&gt; &gt; &gt; The docstring of the map-elt function from the map.el packag=
e (version<br>
&gt; &gt; &gt; 3.0) mentions that TESTFN is deprecated because &quot;its de=
fault depends on<br>
&gt; &gt; &gt; the MAP argument&quot;. However when I try e.g.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (map-elt &#39;((&quot;A1&quot; . 3)) &quot;A1&quot;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; it returns nil.<br>
&gt; &gt;<br>
&gt; &gt; This is expected, as alist keys are tested with eq by default.<br=
>
&gt; &gt;<br>
&gt; &gt; That&#39;s what the docstring is trying to warn about: alists def=
ault to<br>
&gt; &gt; testing with eq, but can also use eql, equal, or anything else.<b=
r>
&gt;<br>
&gt; Is it that obvious?=C2=A0 We have `assoc&#39; and `assq&#39; built-in =
- to me it&#39;s<br>
&gt; not obvious that &quot;alist keys are tested with eq by default&quot;.=
=C2=A0 It&#39;s the<br>
&gt; default for `alist-get&#39;, ok, which is used by the implementation, =
but<br>
&gt; not everybody will know that.=C2=A0 I would add a sentence about that.=
<br>
<br>
</blockquote></div>

--000000000000a5b12905be6b9e6e--




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

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


Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 03:59:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 25 23:59:44 2021
Received: from localhost ([127.0.0.1]:40119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPddQ-0004JW-5H
	for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 23:59:44 -0400
Received: from mout.web.de ([212.227.15.14]:59647)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lPddO-0004JJ-9L
 for 47368 <at> debbugs.gnu.org; Thu, 25 Mar 2021 23:59:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1616731171;
 bh=+Rg+cBztu3GoLVSgGIblcAF4ba5m2HigisrcXH1UenI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=pUMEZS7J2KFuahAsxRE1xeTAXqek0yzALKUf/x63XSqyvM9BlQnCLt+QtEvhT6uCL
 CqcpVa3zijtoUOcei/bln6Lew+BRab+IWVGni16nGSCEXwVO/plMaRKyInmgE/tuCN
 yQ/lRwbgthd9QxytWiwBqjS6aSQlzbufMod8l/M4=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([188.99.163.242]) by smtp.web.de (mrweb001
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M7Kek-1lcL010xC2-00wzyl; Fri, 26
 Mar 2021 04:59:31 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
Date: Fri, 26 Mar 2021 04:59:29 +0100
In-Reply-To: <87lfacvtwt.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 25
 Mar 2021 03:39:14 +0100")
Message-ID: <87blb6h8f2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:V80cIJy+ErKdjADL6HghyxeJ2Xhjn4wktyWMTPy6zP+pcKX53bW
 Ooq4JNhdxCdw0DY+xgh9z+z7jFPVEIsCZxf5fHIHS1FQHZaZu/Ul/XXtbZt/f1ExhdpKnUc
 PsgcJ3pWGxdTwZtMro9+teVcK7Dp26Faso7gA8tMdJwQmj+M2TwHoMRWV6dWICN+eKD79GL
 AxhKfF3n39xXKFKJWmxkQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:FjrBhb9MqgQ=:uNQheXNB2AxWWeaSWbcgJF
 tkYwawqaXG6AvHOqin5n9hvdQXtetF5CsfLqCMWAOgeuMNlQODCVxZaPhGvaP67iLka2oMB+c
 7YhrpreBndFSpqjXuWeCgyf6N9cO16ykY0sHfEsuX+dN6h204z1PLjVb85X2rFjJsdmbqSfzh
 QRa/BH7yPIhsqstVjndUbcJTfg7Y1btdXFcqAtz1212ZIzlPgBrAsZaAAVux+8qr9Fg1u6i4G
 0UBbtHicvgpraYxLyjRAOkS4cI088L1+YIJLQxRIqHKcQi6Ol1RCguiG30flQ9sL5F8fBLw5m
 uIF1h4VeRblDHZFS78exQcis9FwdYT+qKEiDLZYB7D+7ppechvxh2rp2DxIoHtHRCjIiAdubc
 WqXSCPoyNXQTBMTpZBMZaUwFylngzYaw2o7TgSIZ4qE74l+6pDUsm7cEZNCCUmWTqHs54YhDg
 z9CaQQPwOlh/HyFz9Jd8TCHaka8qqJsNdcSXQBe1WWx4yX4Wk5IFUorYhRWjsNQpUdGTNismS
 zvT+/O1NCWY5canCe7ralrLf25qJ3pw6LWoqdvLF981MS+KIYGBfI2CQdUOb8jN3XYfFi/0vW
 Ll574lOrsS+Kx8DWGWwCsgFEIvR8/fFovniBT+8Q1iXzoOJUk5GpSodEiRVkyGU+4J0n9XbLI
 WOnZnHheb14nhqrEd2IDI/NaxwbjRZw5tQJ4YSCW1m+rFxL7dMUg+Os8cx+erXORSefAPDYR6
 8LvAI+6RmR9d67LzxGiogNiO1Gq2hjHUJWKg6E1BojDcmNlKdMmlrDn/rUxAakqF8k9T3+sO3
 LPQX2RTKf2IJiMWcLUTYQk7G+/BWY98DjS44xybfOmlxiwyxVHMKDeVzExO5NL24nS4BCF/1z
 RiCu93W6NnwhBGw0MJGBR4gDqGfhNT53zPATFM3CHd+hBXcERpS1ypGKlDyebeBkVeLhvWn/h
 Dv7qgxyB5uP3sBSS7vUfEPvu5j9+IaFjPPztvqBRnopY0NBfcvcmaceYEhjUqVLZcfMom+wC4
 nWl5teMGVA0BiaRYsU5tyJPbQcXLe9P+bHHs5j0KE91c0AOzcAPoriwY8QgWXLXGZFjcIt7YQ
 IjSJP2JQIJwpDdap+UPyKg7ECOFkbinzZxjmg+FNj0s1xS/KroVSiZuUPEyVKEvDAYurqaXR/
 CwCNc73DDsxxS9nCytbppFgthuy2jFWWDMRytTq952KqC1L+gZV//WxhSk06uJxdUeEis3nBi
 TjxOASHczipqc+mLD
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47368
Cc: "Basil L.
 Contovounesios" <contovob@HIDDEN>, dalanicolai <dalanicolai@HIDDEN>,
 47368 <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 (-)

Hi Stefan,

we are discussing here the limitation for `map-elt' calls with alists
caused by deprecating the TESTFN argument (done by you a while ago).

What's a good way to solve this?  Obviously the map abstraction doesn't
fit so super well for alists because unlike the other map type alists
don't know "their" test function.  But disallowing alists that don't
test with `eq' seems an unnecessary restriction.  Can we say that the
argument is allowed only for alists?

Regards,

Michael.


I <michael_heerdegen@HIDDEN> wrote:

> > > The docstring of the map-elt function from the map.el package (version
> > > 3.0) mentions that TESTFN is deprecated because "its default depends on
> > > the MAP argument". However when I try e.g.
> > >
> > > (map-elt '(("A1" . 3)) "A1")
> > >
> > > it returns nil.
> >
> > This is expected, as alist keys are tested with eq by default.
> >
> > 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.
>
> Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
> not obvious that "alist keys are tested with eq by default".  It's the
> default for `alist-get', ok, which is used by the implementation, but
> not everybody will know that.  I would add a sentence about that.





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

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


Received: (at 47368) by debbugs.gnu.org; 25 Mar 2021 15:33:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 25 11:33:47 2021
Received: from localhost ([127.0.0.1]:39291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPRzX-0002q0-2t
	for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 11:33:47 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:46808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1lPRzT-0002pl-8d
 for 47368 <at> debbugs.gnu.org; Thu, 25 Mar 2021 11:33:45 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12PFEmuL102786;
 Thu, 25 Mar 2021 15:33:37 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=0xC9Thp+HaVoaScMy6D+JdjCjltdeA3XMs0FvOV7qWU=;
 b=V6B0dxrl4NVFjG1FUrK02ch3ZmcXQIiDtrFQY10sXH8U0qpJTKtZ9KKQSs3MztGv+bHZ
 l7f5zDqQ7+aO8JMzGrI9I+j+WHodyU/lxqY+AkVSPonHH5t4T68oh/8S2s0ak+6dkDuB
 JEftthyF3fCI+mrHqOhCB3veg8SGbANiZ7omPoVz3DREXD1gp6ACLDbDTJrK8LCB2SPZ
 9O7U5Emf5vdkqv50HJ0IvY0EDDxr+NlaLoKTlIatDbZ2oQUCCn1IQHxXk9JHvd/9ZPEo
 ZSp5imDjRHDoRJzOeHNovy0m9dt/uex9tFtdzZSwd4M8ZlUUDe6af2nj2FCDffhzfJRN PA== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by userp2130.oracle.com with ESMTP id 37d8freqwu-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 25 Mar 2021 15:33:37 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12PFAVAt011274;
 Thu, 25 Mar 2021 15:33:36 GMT
Received: from nam02-cy1-obe.outbound.protection.outlook.com
 (mail-cys01nam02lp2056.outbound.protection.outlook.com [104.47.37.56])
 by aserp3020.oracle.com with ESMTP id 37dty21kuu-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 25 Mar 2021 15:33:36 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=FrXSHu6SX4aDbOVIvSPvcRVw9M+DZNPZHfzUxufy2Ud1oIiy5rsok2dLvL7NwzN7pS5sivkTLKPOlO8i5hA9iaCkENEpOokyjNsWU5cWFPwYxjRxADNMVBHLoCvh5eXw0JaR9Tvdho5oXdHI8AkxQSOPyqyslzK5ucOuJ1CA+Ku9/rt2SGs7dhDj/LNHUVcRa4Y9rVuIUQcVU8Us9oZ18NabWjuk3RSsM6YyZZRKTif0oSPIboutyJBvaUu8M4V04D2s1nmm5fYEuiGzs16zwUqAcsBnITS/fH2iMYLwD5K8U7FpW3skLICSJEP3gl+47bC5JME2rcjeP0H8jTNDSg==
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=0xC9Thp+HaVoaScMy6D+JdjCjltdeA3XMs0FvOV7qWU=;
 b=hjuR3biHNsegFby88MWeeurPq/06vu6WSxymjdM1Z/8UnftVBDQjlf+l6Kso/cBn+02yefQ4a1S95W6QSvV8Hj4KgG28HCp03zLy3q4EpPAKK2OsDEr2pncfyWIFAP9dp6oEey8HA7kEZR9mJjeAiAEetmS/hk0OgNNNOZR7zg/xGdzlZCmrE+HFCorWe0KtfboUaaazZK0MB86fi5NgWsnHjTIM9406A5HpqZSoDANJZRQBsrB/BUuwVZi+PaGgHDa3ZeQzL6fVUByQtQYZ2JNK2NsUCifzXk6eEOjmwlyiTRxPxpzc0rxv/kR09j2WiT/+m9FZu2VFgTJWs4E76w==
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=0xC9Thp+HaVoaScMy6D+JdjCjltdeA3XMs0FvOV7qWU=;
 b=ZBc0GpXi9R4CEQyr/JDiDy9O/fmW+8Rn86lWuvfcBtWkS7KTlKzASfoEgeTr7L8adwGu5EMZBR6Y/hC87IrZyVq4WMhaK9RVKAi0PoYi9JB1Y57GKFQV+838uSPDL8iGBBDESWM45EbEJ+lIHPRUU4OCk5e/9SdphUwx6pPpkg8=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SN6PR10MB2592.namprd10.prod.outlook.com (2603:10b6:805:4b::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Thu, 25 Mar
 2021 15:33:34 +0000
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; Thu, 25 Mar 2021
 15:33:34 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>, "Basil L. Contovounesios"
 <contovob@HIDDEN>
Subject: RE: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Topic: [External] : bug#47368: 28.0.50; map-elt returns nil without
 "deprecated" TESTFN
Thread-Index: AQHXISBA9FFMBqcRUkigHhBsFRevMKqU1Sxg
Date: Thu, 25 Mar 2021 15:33:34 +0000
Message-ID: <SA2PR10MB4474D836C620E5AA9460AD95F3629@HIDDEN>
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
In-Reply-To: <87lfacvtwt.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: web.de; dkim=none (message not signed)
 header.d=none;web.de; 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: 1226436c-f4a8-4c43-141e-08d8efa35a35
x-ms-traffictypediagnostic: SN6PR10MB2592:
x-microsoft-antispam-prvs: <SN6PR10MB2592676BE236AC6BAB2CCA64F3629@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: fElaGI6QgWxwHYh7UgrgegvzvgL62KFIOWuu9vS/gPChmmpmJMIGsvDYh3NDiw3szorGqgeG1vopYt/yjKuqPz7lt2CNbzgHte6tOc5d15Y1KebfbEjOXgEX/QpNzrrPdty4BYN/0aoLu3ZSs1kIZ7+V80bijDp7AywbdsKjbhzHcj1Y588AYjZQyZ4zwQNeTfXX2ODtJZdGCu1YC1RLaMO2rDviKR16hQCZmHstfHYh1YVdKHgRgsFlHJMLgSnJFARDVBM0d14JE78OMeAoLxUa/5sY6MD/SrPq6HbtEYErI2qKZ4hwP34Vz8Fpqx4Ch4XnYgrsvmep5NuSL383rs2J+Hdj2nAxKxmfufwPCC6ZLTfbVxAnAdBBKjqllnm50sA6VkHw1jciK/RLAPLNhFWv0cLxEdnD58QTGB9ucisvd+t2PQMtuA58HCKfY4cQGmO+m1k/oGjVrToGWnTv0LMAr4o4BnmOlEqbe5QqkO6WZkRvGj3uhdTu0jZF8eqIadIbW/wkg/4wU+uyaYtfY7jJcoWs4MCpw3BCmL5eDJj6k0014JmZ0yD6H+JfnQdGpdv5/gjs2o60F5Qq16pAyaLaT2MS5ZgTvch4TYc5cw0VQ1TRpl2QMRCgVcrTnPA42LeUK2HQFLzg3gd4LHVkI6zM0mQE32Dw4VFfbCgwebI=
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:(39860400002)(346002)(136003)(376002)(366004)(396003)(26005)(8936002)(33656002)(4326008)(54906003)(110136005)(186003)(8676002)(71200400001)(52536014)(44832011)(6506007)(2906002)(76116006)(55016002)(66476007)(66446008)(38100700001)(7696005)(86362001)(9686003)(66556008)(66946007)(4744005)(478600001)(316002)(64756008)(5660300002);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?KTCEPwW+rorsJ1TSCZatsvPUZHWTc6dGusOxiFHmWpwIMF53hll7smN1AbRa?=
 =?us-ascii?Q?AkyJuxDDEwAOiJKyRaPIDkUBPabv1JzQ4lLctoeBw+cCWf4Zp/rgC5GpB+vU?=
 =?us-ascii?Q?gIsEnbGqSNWXtj/5KCz0BeWwdn5xW7T0iq2+RFIY70/JXipvmK78/cjjnCKR?=
 =?us-ascii?Q?yCwl5L4ydUuy3n9iVPz8uXI8AK3FrGHuqkOEBxCF9/FnX654RYSKmdI6yH/h?=
 =?us-ascii?Q?4CZ+Cm2cQIfic8/dP2WI3YZkHMuBQ4cfPDKB8/L6BMKzXGCFOmUana1gn0yH?=
 =?us-ascii?Q?zXrBJGpwDZvVqXF7IAamD8pVngd5Je50xJYEulij7Ox7Rqc8tULd1u1a855J?=
 =?us-ascii?Q?5y/8jUTym0Am1d8k5hD/ALZliT+7RVwaESWhXBDByB4aQpKkpDEbFmSOnchz?=
 =?us-ascii?Q?I+ThAnksNChgN8Z1ey5QxE67yJPvUDqkASPK3mSkGq1oCpTvFJ2iMZZnHdUi?=
 =?us-ascii?Q?ePosQn3YOzFrMFOw/RlGxGx9tZrNbNTxtQl42n6WjyyF929VeW8nbMyM9ghs?=
 =?us-ascii?Q?7QhMeRf+xmvwpFfet2UXsfP7bo2nZ9mWzmumZLK3E5sVaV+t4n1EnSC5J2H9?=
 =?us-ascii?Q?unxYMdBZWNvFr+I0vlu+94Hzqs1N2gQ1FBkeFlx90hSyjlODnW4IqoFnJgM7?=
 =?us-ascii?Q?9tAHeSOUBG4iZzk+xUsGEaqfZ4GDUDcM9PJu/6XJbkvegthf69u+QrhRfZAA?=
 =?us-ascii?Q?xnCl2fOnYogbEbQ7fN+73dq28QmjXW43XyTSt1x+3tjReyO/a5Z465KYqaqX?=
 =?us-ascii?Q?k0+0wogoIase58D2a454vFtPAlnIXsXBpMcgGzF5BuwwW+l3LLFk8M0bgqoq?=
 =?us-ascii?Q?GOVLxgdHAvnWkf61SqPm5bgS8nLH12D6MzZYsm51JzBSs1dvBkJoYtjusFCj?=
 =?us-ascii?Q?lVvGfc1LGhV/XpqiWJfnjlgMsrCBGeMlxkxy+L0SHatDgFWUjCnI3myXMtSm?=
 =?us-ascii?Q?91cXeiCRVKToO4rhuBRm3BEpRVJOe8Nq6v+uW09BI+mxyHb83KM0XkHPPohd?=
 =?us-ascii?Q?8sud4SYIZ5oULmUvQU9jG8dNS4+YZrvyhR5Q+7nIJ4hhXCBMlvvuf+ftoy7s?=
 =?us-ascii?Q?BMyjtXmb2lJK8iVmxBHMZR9srh7LAX9tV+fOsDtuHnD3c5mFws50IOoO8rOt?=
 =?us-ascii?Q?bCqiVEVc/ioGmLbmBx4yXwALyo+1HbnWDqzrO/f28Ls41kOoE45JbN6BitT1?=
 =?us-ascii?Q?eiCnS24MHs3DOu8JenUbf3HRx865wRO2BFA8x1W+PVQS/X0SBILYOl+0ZdiA?=
 =?us-ascii?Q?aLCMMzVSl2+KgTPWyYu1onb+zNAOnixsK6g1fozm4ILHvVK7sRXg6ruWmT68?=
 =?us-ascii?Q?F/U=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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: 1226436c-f4a8-4c43-141e-08d8efa35a35
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2021 15:33:34.3915 (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: BbRZlvWEbk8/sHZLAxkTypyFi4tgZrH9WNzSqZ9YYC+rynoZT0A2NZ0M3EScJnaTJawB15ugMk/DHMDYov5ZbA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2592
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9934
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 mlxlogscore=999
 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 suspectscore=0
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2103250111
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9934
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 priorityscore=1501
 impostorscore=0 spamscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999
 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 clxscore=1011
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2103250111
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47368
Cc: dalanicolai <dalanicolai@HIDDEN>,
 "47368 <at> debbugs.gnu.org" <47368 <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 (---)

> > This is expected, as alist keys are tested with eq by default.

Since when?  Where?  Expected by whom, and by what code?

> > 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.
>=20
> Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
> not obvious that "alist keys are tested with eq by default".  It's the
> default for `alist-get', ok, which is used by the implementation, but
> not everybody will know that.  I would add a sentence about that.

+1.

Alists are general.  They can be used in many ways.
Their keys can be tested in multiple ways.  Neither
code nor doc should assume anything about how an
alist is composed or treated - nothing beyond the
fact that at least some of the list elements are
likely to be conses.




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

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


Received: (at 47368) by debbugs.gnu.org; 25 Mar 2021 14:48:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 25 10:48:21 2021
Received: from localhost ([127.0.0.1]:39202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPRHY-0001Xb-IE
	for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 10:48:20 -0400
Received: from mail-vs1-f45.google.com ([209.85.217.45]:47087)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1lPRHW-0001XL-Cw
 for 47368 <at> debbugs.gnu.org; Thu, 25 Mar 2021 10:48:19 -0400
Received: by mail-vs1-f45.google.com with SMTP id r11so1006236vsj.13
 for <47368 <at> debbugs.gnu.org>; Thu, 25 Mar 2021 07:48:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=iYUPel/AAlHhX15K0LCGlaydFi3QCZnI2i+HpPm6O9s=;
 b=cEvhR8NLiHB2KfvdpSZUA5+xcTX4k7jDhWQQ/AGCgB3i7MvWN431NgugwahcMLEfJf
 lqeu+2FoCnp52DAdD+TtJ1qI1HWdfyfo+0IO4A2fH9uq8uOesuOzrsdHe9tMlxZ0VGb1
 i1rsfl3MUknJCBVIlJeHm1KolvYd9hx7NxCwehciC4A+Kwt0j8tMQcbcYDOU48KNILlc
 ScshxTZIUnhqZGC70x2DdAiFtEHonveRhIm/3dsL/mh4lYQtTxM+i/hKxwPGxcBjrYF6
 +KMQCwpC0QOTS3j2cFyy1ex7wleUClOy81d/KAzawNJZGhQ+Rzf5SEbgrRCK2vnQbb02
 xF2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=iYUPel/AAlHhX15K0LCGlaydFi3QCZnI2i+HpPm6O9s=;
 b=Ipn2qcK3/yDCtIgNJ+n60OVWlETzXNsHTdZDJp+IvQS9rnu2yTXulep3fmYrGSfw7+
 aTWkfBEnb6Yh7TIa5f86x4zuCPI6R6Q437SgF7VM6+1aYVLVrI1D79DIf/8eylxR5LhT
 RTS/yi28MxKVsG715F7HiDKXUzuR0sI1Ai6ag9sP0xBhqoQ8dEQ6SxZmPdQvQh9GbbQh
 W66kT+lO9dX7NwJsA7L4KBDuMLSGlMpXyxbCVdaiamEH0lTPMSug3kQ3/hhXfzEmkQsd
 DlPwl+eW9HlH+7m+2ladyizIBywpkmMYFGgb2Ovk8AIlfzRsh5rgUXDk+jlI6EEQdcS0
 Gu6Q==
X-Gm-Message-State: AOAM532hs9poH3ROnNG6gpR5woiZlrQDfacUtveOepnh8gdZU1CwnMbJ
 gtDRLq+kb/FJCaxJPS5qkVa4x77x8vjqwz5T4pI=
X-Google-Smtp-Source: ABdhPJxBa6x4AhtqMSgxx94I3Wweh3KT60tID0atfQTtpTFgQAenG3UNE+fiSZIwewNPQ3mNsU25JZUAaY8O/pFFjBk=
X-Received: by 2002:a05:6102:323b:: with SMTP id
 x27mr5380939vsf.0.1616683692829; 
 Thu, 25 Mar 2021 07:48:12 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN> <87lfacvtwt.fsf@HIDDEN>
In-Reply-To: <87lfacvtwt.fsf@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Thu, 25 Mar 2021 15:48:01 +0100
Message-ID: <CACJP=3n7oRywQZt_zjkYwXng34VHk9fsfz2AL87jWyRC5vMuEg@HIDDEN>
Subject: Re: bug#47368: 28.0.50;
 map-elt returns nil without "deprecated" TESTFN
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000039ad6005be5d812c"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: "Basil L. Contovounesios" <contovob@HIDDEN>, 47368 <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 (-)

--00000000000039ad6005be5d812c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

For clarity I will insert the first lines of the docstrings here:

map-elt is a Lisp closure in =E2=80=98map.el=E2=80=99.
>
> (map-elt MAP KEY &optional DEFAULT)
>
>   Probably introduced at or before Emacs version 26.1.
>
> Lookup KEY in MAP and return its associated value.
> If KEY is not found, return DEFAULT which defaults to nil.
>
> TESTFN is deprecated.  Its default depends on the MAP argument.
>
> In the base definition, MAP can be an alist, plist, hash-table,
> or array.
>

First I agree with Michael that this docstring assumes a lot of knowledge
from the programmer.
The sentence "its default depends on the MAP argument" could be more
explicit, to make the docstring friendly to new elisp programmers.
e.g. mention eq for alists (and also the TESTFN's for the other ones)

Second calling the TESTFN deprecated is misleading if it a basic
requirement for the basic thing I am trying to achieve (i.e. matching a
string).
So it should probably mention that it is not required if you want to use
the MAP's default TESTFN, but otherwise it is required (while deprecated
sounds to me like there shouldn't be a need to use it)

Thanks for your answer!




On Thu, 25 Mar 2021 at 03:39, Michael Heerdegen <michael_heerdegen@HIDDEN>
wrote:

> "Basil L. Contovounesios" <contovob@HIDDEN> writes:
>
> > dalanicolai <dalanicolai@HIDDEN> writes:
> >
> > > The docstring of the map-elt function from the map.el package (versio=
n
> > > 3.0) mentions that TESTFN is deprecated because "its default depends =
on
> > > the MAP argument". However when I try e.g.
> > >
> > > (map-elt '(("A1" . 3)) "A1")
> > >
> > > it returns nil.
> >
> > This is expected, as alist keys are tested with eq by default.
> >
> > 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.
>
> Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
> not obvious that "alist keys are tested with eq by default".  It's the
> default for `alist-get', ok, which is used by the implementation, but
> not everybody will know that.  I would add a sentence about that.
>
> Michael.
>

--00000000000039ad6005be5d812c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>For clarity I will insert the first lines of the docs=
trings here:</div><div><br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex"><div>map-elt is a Lisp closure in =E2=80=98map.el=E2=80=99.<br><br>=
(map-elt MAP KEY &amp;optional DEFAULT)<br><br>=C2=A0 Probably introduced a=
t or before Emacs version 26.1.<br><br>Lookup KEY in MAP and return its ass=
ociated value.<br>If KEY is not found, return DEFAULT which defaults to nil=
.<br><br>TESTFN is deprecated.=C2=A0 Its default depends on the MAP argumen=
t.<br><br>In the base definition, MAP can be an alist, plist, hash-table,<b=
r>or array.<br></div></blockquote><div><br></div><div>First I agree with Mi=
chael that this docstring assumes a lot of knowledge from the programmer.<b=
r></div><div>The sentence &quot;its default depends on the MAP argument&quo=
t; could be more explicit, to make the docstring friendly to new elisp prog=
rammers.</div><div>e.g. mention eq for alists (and also the TESTFN&#39;s fo=
r the other ones) <br></div><div><br></div><div>Second calling the TESTFN d=
eprecated is misleading if it a basic requirement for the basic thing I am =
trying to achieve (i.e. matching a string).<br></div><div>So it should prob=
ably mention that it is not required if you want to use the MAP&#39;s defau=
lt TESTFN, but otherwise it is required (while deprecated sounds to me like=
 there shouldn&#39;t be a need to use it)</div><div><br></div><div>Thanks f=
or your answer!<br></div><div><br></div><div><br></div><div><br></div></div=
><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Th=
u, 25 Mar 2021 at 03:39, Michael Heerdegen &lt;<a href=3D"mailto:michael_he=
erdegen@HIDDEN">michael_heerdegen@HIDDEN</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex">&quot;Basil L. Contovounesios&quot;=
 &lt;<a href=3D"mailto:contovob@HIDDEN" target=3D"_blank">contovob@HIDDEN</=
a>&gt; writes:<br>
<br>
&gt; dalanicolai &lt;<a href=3D"mailto:dalanicolai@HIDDEN" target=3D"_bl=
ank">dalanicolai@HIDDEN</a>&gt; writes:<br>
&gt;<br>
&gt; &gt; The docstring of the map-elt function from the map.el package (ve=
rsion<br>
&gt; &gt; 3.0) mentions that TESTFN is deprecated because &quot;its default=
 depends on<br>
&gt; &gt; the MAP argument&quot;. However when I try e.g.<br>
&gt; &gt;<br>
&gt; &gt; (map-elt &#39;((&quot;A1&quot; . 3)) &quot;A1&quot;)<br>
&gt; &gt;<br>
&gt; &gt; it returns nil.<br>
&gt;<br>
&gt; This is expected, as alist keys are tested with eq by default.<br>
&gt;<br>
&gt; That&#39;s what the docstring is trying to warn about: alists default =
to<br>
&gt; testing with eq, but can also use eql, equal, or anything else.<br>
<br>
Is it that obvious?=C2=A0 We have `assoc&#39; and `assq&#39; built-in - to =
me it&#39;s<br>
not obvious that &quot;alist keys are tested with eq by default&quot;.=C2=
=A0 It&#39;s the<br>
default for `alist-get&#39;, ok, which is used by the implementation, but<b=
r>
not everybody will know that.=C2=A0 I would add a sentence about that.<br>
<br>
Michael.<br>
</blockquote></div>

--00000000000039ad6005be5d812c--




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

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


Received: (at 47368) by debbugs.gnu.org; 25 Mar 2021 02:39:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 24 22:39:26 2021
Received: from localhost ([127.0.0.1]:36721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPFuA-0002tU-MB
	for submit <at> debbugs.gnu.org; Wed, 24 Mar 2021 22:39:26 -0400
Received: from mout.web.de ([212.227.17.12]:47097)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lPFu8-0002tF-6l
 for 47368 <at> debbugs.gnu.org; Wed, 24 Mar 2021 22:39:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1616639955;
 bh=2gSaM/dNXr55aAa7T7Od7Fs/0PMC+0yZliU+3fmmkx4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=I04CATAnWwBOwfCmu2vHk1bpYK+GXwRNNvqp9AiFusdB/wcQ/kUpnKeMmtZG4Ekpo
 iyXWHcq2+C7i14HSzm5WaeYvOKSM72+3mBgEAg37JVbOlEnlB55647sclR0BNrMh57
 YIPV34LFlo1tHskhRTmTGjJtq3G7CIsi9ImD0abo=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([188.98.110.120]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MZSFY-1lCTmX2wZa-00WZzC; Thu, 25
 Mar 2021 03:39:15 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 <87sg4kyw1q.fsf@HIDDEN>
Date: Thu, 25 Mar 2021 03:39:14 +0100
In-Reply-To: <87sg4kyw1q.fsf@HIDDEN> (Basil L. Contovounesios's message of
 "Wed, 24 Mar 2021 23:24:49 +0000")
Message-ID: <87lfacvtwt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:BZPI1Hb8joXofk6Udfmiyf3PAupze37GRBspKPDwuzJSX371z8R
 qqJXT2HlBLT2CV+N8SIa77++4tmbSS8hZ5TOqyvgBKatpVoCPc9+XLuBauIKUQlgrYpdiuC
 G8CWw89D3od8o/lJGiAOkt2i85vNdmFJIvjdYs8AEWTEUc0XT6pvq2SC2j1UNf4U0tt4qMY
 UtuR6AXpyddmS+lSE4BnA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:2Jd2vuusTiM=:OuDLCdF9UfoVMwKsR3ub01
 RaqSWx42sonOzp4gM3rDqN8SbaEjIphIGL9xSFJ4PIdnL83KPpnx9FfCQ2p/oibbwS8LN28Eh
 6yiuT1kw1kAzGu0OCgXsJv0BUQxtRiyBSJ7RuSxt7UTvw94acCPWP98Z/tFvq71q2bO5BZvld
 CRaLkSt3qcXufCgWcOS0sxABDeYrIHw/dWODkNUfng7wPoRObq34/bgGMcPLh8n4TMKfz/kVz
 nVClfBbVOyM0COljDfqerckLiBae9g/8GHk4usWtsSWIiTkd3USNpw/pob+8N0g2BLh+uJHd+
 SgL+u486Yd6IJE9nLwEMXbon2Yep2fn6If/kkt502UNh5d6MAUAAQGD1MQM5ANAvG6ZheM18j
 eVV3r0l/Be6rvZyFzR41xu2l5FSGn1RjXXA6WovnAoG1VoEGwMtzoUBgDgjvdWT/kfmfUbTFe
 iHscRpslahtdEaMt5V6zEZezzYThgFzfzamUOjj9h3McZH/C0B1BSvLmy8qFo2A8MPdvc/g7J
 3aXXPl31eD1F6H3tKSVR1zy6iSsoZBLWRwpS6+hdhSO1gfJtDAdpiN26tvOMVD0CfVqWuJ6/4
 PCIE5Wt69JJlHR6RdAUlrcBrT3kScuMtrddVWtwQIcB4PiIV05ZKcYvAoLcPBWoj5F17FTe+u
 g7ntbDtQexRVynHsEoGys1qisEkE2xnSbDdB8fgYbJs9QskF67Y04AQgfOX3xUXWyA5XgfLw6
 u6rtZD9ZMjv8ZB7/W4S0OpQvTvRVR+N0ZAbf1+G1W8w8Ki4qqszyAMC+EQDeGJ/IL2BNBWIhv
 fT9QLvKfwfqy5Q7ZUgSrl4B5r/hZ7oJeIlsQ2uU6t7fFJIpVwSpOHP9rQp+vxTg1hzrNAilqP
 M2rquCV/0FJyZwIqNe7SlRbSRLTlv7ffVHyS/ZFsk=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47368
Cc: dalanicolai <dalanicolai@HIDDEN>, 47368 <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 (-)

"Basil L. Contovounesios" <contovob@HIDDEN> writes:

> dalanicolai <dalanicolai@HIDDEN> writes:
>
> > The docstring of the map-elt function from the map.el package (version
> > 3.0) mentions that TESTFN is deprecated because "its default depends on
> > the MAP argument". However when I try e.g.
> >
> > (map-elt '(("A1" . 3)) "A1")
> >
> > it returns nil.
>
> This is expected, as alist keys are tested with eq by default.
>
> 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.

Is it that obvious?  We have `assoc' and `assq' built-in - to me it's
not obvious that "alist keys are tested with eq by default".  It's the
default for `alist-get', ok, which is used by the implementation, but
not everybody will know that.  I would add a sentence about that.

Michael.




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

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


Received: (at 47368) by debbugs.gnu.org; 24 Mar 2021 23:24:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 24 19:24:59 2021
Received: from localhost ([127.0.0.1]:36414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPCrz-0002FM-Ld
	for submit <at> debbugs.gnu.org; Wed, 24 Mar 2021 19:24:59 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:40475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lPCry-0002F5-DB
 for 47368 <at> debbugs.gnu.org; Wed, 24 Mar 2021 19:24:59 -0400
Received: by mail-wr1-f47.google.com with SMTP id v11so448218wro.7
 for <47368 <at> debbugs.gnu.org>; Wed, 24 Mar 2021 16:24:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=aAx/QuSBq/iHyTFKg+pUAGptNkQTAIu64ImGdXOOOVg=;
 b=NXeN+aRxNBKqlwqIvkMGev1h0dBkQHxYd2bj3KMxn3F8hQPqG6ltWqBkg3SoE7rVJv
 UckjNMYNkkAaI5oBC6dronqcn3sQH35KBVBZwhMJSru8gxLnK7iP1eAGYj9GlxvsYL+W
 xfvtPGv1lskxTHj0LpJLWAINUltIumKeaFtaNIxrkHUqCCoXHIpycQEHjBsUri7cBcts
 SxDYNtrvDr0tNV0UKvcGzos0SNWgTElfxV3VVFfkw97S2c58PJ/S4aaX9MXlgC+TjHs2
 6OBmltGbAr/0Vgc05JsQH0WXnJIX+S50KSojo2QBfM/CMEqvdfVHbaDr4zk6zRngcPIc
 D70g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=aAx/QuSBq/iHyTFKg+pUAGptNkQTAIu64ImGdXOOOVg=;
 b=JpU3fN0pXj1dTb3bWtlxVYX2TWOsyYuHL/KB5BHvsVCfp0tChf1qgNgQ72Mp9RxS8Y
 s7bsnlEmBvKjNja84FhbOlL0LZsIDerWJgVcZL8zmj3L4IF57GMa+UuSzwc+Ff+trjuz
 TpJkaLBn2QYAAMQXGuyvpd1ymH1mGnhfmHwRS883E8i2cHkI+NCWLGrm7AGBouFvDPRe
 9NGjitDNBZoQCiahceEcz/mQ3aK/+QZevk00KRCB+B3MubWtSBpBDmOZJqY2vfL6uZWy
 M5uHKcjAYdhyf9XPMVwH6Yibjbenx6zuTH5/Ef9/9dJAGunoEa0GPD5qRznXQ+AMPqDm
 DmKw==
X-Gm-Message-State: AOAM530UuGRhFhtAE9Tcwn7E0nCzTY/I7/5FVpLqiFW+aXaK1MT0Q0LC
 NPYRP3v2EIC6zmV2968wZxsY0Q==
X-Google-Smtp-Source: ABdhPJwztJd1q7e3tYBD0NYJDfB19ffU1P/l64sRRPk5a7ejPnY9ov2c6nqewS/DDIHt9/tHug4W4Q==
X-Received: by 2002:a5d:6dcc:: with SMTP id d12mr5681987wrz.136.1616628292618; 
 Wed, 24 Mar 2021 16:24:52 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf])
 by smtp.gmail.com with ESMTPSA id j16sm8445784wmi.2.2021.03.24.16.24.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 24 Mar 2021 16:24:52 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: dalanicolai <dalanicolai@HIDDEN>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
References: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
Date: Wed, 24 Mar 2021 23:24:49 +0000
In-Reply-To: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
 (dalanicolai's message of "Wed, 24 Mar 2021 23:52:57 +0100")
Message-ID: <87sg4kyw1q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47368
Cc: 47368 <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 (-)

dalanicolai <dalanicolai@HIDDEN> writes:

> The docstring of the map-elt function from the map.el package (version
> 3.0) mentions that TESTFN is deprecated because "its default depends on
> the MAP argument". However when I try e.g.
>
> (map-elt '(("A1" . 3)) "A1")
>
> it returns nil.

This is expected, as alist keys are tested with eq by default.

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.

> When I add the correct TESTFN
>
> (map-elt '(("A1" . 3)) "A1" nil 'string=)
>
> it does correctly return 3.
>
> So it seems to me that TESTFN is not yet deprecated, or that otherwise I
> am understanding it incorrectly.

Deprecation means "this is not recommended" and "support for this may be
removed in a future version".

So to me TESTFN seems to be working as intended.

> In that case I would label this as a documentation bug.

What would you like to see clarified in the documentation?

Thanks,

-- 
Basil




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

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


Received: (at submit) by debbugs.gnu.org; 24 Mar 2021 22:53:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 24 18:53:18 2021
Received: from localhost ([127.0.0.1]:36357 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPCNK-0001Pp-9q
	for submit <at> debbugs.gnu.org; Wed, 24 Mar 2021 18:53:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:55584)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1lPCNJ-0001Pi-1Y
 for submit <at> debbugs.gnu.org; Wed, 24 Mar 2021 18:53:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45818)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dalanicolai@HIDDEN>)
 id 1lPCNI-0000Hq-CH
 for bug-gnu-emacs@HIDDEN; Wed, 24 Mar 2021 18:53:16 -0400
Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]:34809)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <dalanicolai@HIDDEN>)
 id 1lPCNC-0000Y9-R4
 for bug-gnu-emacs@HIDDEN; Wed, 24 Mar 2021 18:53:16 -0400
Received: by mail-ua1-x92c.google.com with SMTP id j4so8382144uan.1
 for <bug-gnu-emacs@HIDDEN>; Wed, 24 Mar 2021 15:53:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=1KdeWmB5jO2xrglOMNEoiP58U0lvjCM87f/4PfZj0+c=;
 b=OhLTbtnPG7HhYYjGRi+EbKfpQWEwPTQasv8+IJHYl23LtKZYTKb4rj9UiX9VKpj0rv
 qFLt/q8MI3RujBE3iclhblB3Q9IzUKlcSnON/XSNXq/G3BreFxhMGUqyGQ9u5wm/EeXj
 mKa2GDI7jjZC8Pn2nLqChsTJ5+Stw9Qv7pDkajgNLUNIzkA9mjVPQ8Vgva6n89Tbzh3v
 PLPnSSoYayWsYsxWGQPssT6fcxeUWKo6Z6ULMP7lmckgnVpsximB90bNyj7VrID+DZb2
 II3nYjzIDkYJ+DjLxTkAFHNcS8+8EJV48mce2yqHo0vYFHQQwcrUmUmTBK1IMp2XZ8nU
 nzLA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=1KdeWmB5jO2xrglOMNEoiP58U0lvjCM87f/4PfZj0+c=;
 b=PefGcHRZax2x86ReTr5Cyt6CGByQ34d2p8cjxU02hOkYv1VkkdazEE035CY0IlV0Ua
 Z0edB1vvEIWjXDHJnQy/iWiaCgEV625EeZauCylnsDvBmnRSqklJ86T4zAGnktTavXvm
 UDAvhu8y2AhikK1d/dhcWto+GDl440/Sw2K0cxljld8GwTajuTsbabJh+ilBDKGU0GET
 +Tir7jCzfKvFr0Ivl68pIJZ5u29Cj+0btLkYDI9n/nt3R1UEfrgpC6OwePltImkqEG9c
 dBsT0T332ZsXrqZi7Mi1YIo1n16sTwt88lFOQDjiEwBFL/LfK/WJvS+lPVN5Ud/ZQkxT
 LsYA==
X-Gm-Message-State: AOAM531AqV0zvaFK0uuah+wZatjCCRuuDZviMthku1Hl1BiT5SzUqzmJ
 j8wA9nsBhfxkMIjOx2Jynfx2bVxfyc3c9WY8bvgx0goPu6Js2A==
X-Google-Smtp-Source: ABdhPJwS4FC2DXFATCYKcEoJIjsXUBp3eUgqIrzUAFql90Y0ipMENPX/Ac1XdC8OOtnU/BxXPCym8O7A4p7aIRvO5Ro=
X-Received: by 2002:ab0:7316:: with SMTP id v22mr3340359uao.134.1616626388769; 
 Wed, 24 Mar 2021 15:53:08 -0700 (PDT)
MIME-Version: 1.0
From: dalanicolai <dalanicolai@HIDDEN>
Date: Wed, 24 Mar 2021 23:52:57 +0100
Message-ID: <CACJP=3k08VBaj-O5KzqJyDbbkSpsOKLMFHtS5tEJfuSU2Wkmqg@HIDDEN>
Subject: 28.0.50; map-elt returns nil without "deprecated" TESTFN
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000a31fad05be5029a4"
Received-SPF: pass client-ip=2607:f8b0:4864:20::92c;
 envelope-from=dalanicolai@HIDDEN; helo=mail-ua1-x92c.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,
 HTML_MESSAGE=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 (--)

--000000000000a31fad05be5029a4
Content-Type: text/plain; charset="UTF-8"

Message-ID: <87czvonp73.fsf@HIDDEN>
--text follows this line--

The docstring of the map-elt function from the map.el package (version
3.0) mentions that TESTFN is deprecated because "its default depends on
the MAP argument". However when I try e.g.

(map-elt '(("A1" . 3)) "A1")

it returns nil.

When I add the correct TESTFN

(map-elt '(("A1" . 3)) "A1" nil 'string=)

it does correctly return 3.

So it seems to me that TESTFN is not yet deprecated, or that otherwise I
am understanding it incorrectly. In that case I would label this as a
documentation bug.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.25,
cairo version 1.16.0)
 of 2021-02-18 built on daniel-fedora
Repository revision: 185121da6978553d538d37d6d0e67dc52e13311f
Repository branch: feature/native-comp
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Fedora 34 (Workstation Edition Prerelease)

Configured using:
 'configure --with-nativecomp'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils map seq byte-opt gv bytecomp byte-compile cconv help-fns
radix-tree cl-print debug backtrace help-mode easymenu find-func
cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice button loaddefs faces
cus-face pcase macroexp files window text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process nativecomp emacs)

Memory information:
((conses 16 74272 8338)
 (symbols 48 7113 0)
 (strings 32 20890 1678)
 (string-bytes 1 713441)
 (vectors 16 13521)
 (vector-slots 8 292167 12582)
 (floats 8 25 33)
 (intervals 56 238 0)
 (buffers 992 13))

--000000000000a31fad05be5029a4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Message-ID: &lt;<a href=3D"mailto:87czvonp73.fsf@dalanicol=
ai-at-gmail.com">87czvonp73.fsf@HIDDEN</a>&gt;<br>--text =
follows this line--<br><br>The docstring of the map-elt function from the m=
ap.el package (version<br>3.0) mentions that TESTFN is deprecated because &=
quot;its default depends on<br>the MAP argument&quot;. However when I try e=
.g.<br><br>(map-elt &#39;((&quot;A1&quot; . 3)) &quot;A1&quot;)<br><br>it r=
eturns nil.<br><br>When I add the correct TESTFN<br><br>(map-elt &#39;((&qu=
ot;A1&quot; . 3)) &quot;A1&quot; nil &#39;string=3D)<br><br>it does correct=
ly return 3.<br><br>So it seems to me that TESTFN is not yet deprecated, or=
 that otherwise I<br>am understanding it incorrectly. In that case I would =
label this as a<br>documentation bug.<br><br><br>In GNU Emacs 28.0.50 (buil=
d 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)<br>=
=C2=A0of 2021-02-18 built on daniel-fedora<br>Repository revision: 185121da=
6978553d538d37d6d0e67dc52e13311f<br>Repository branch: feature/native-comp<=
br>Windowing system distributor &#39;The X.Org Foundation&#39;, version 11.=
0.12010000<br>System Description: Fedora 34 (Workstation Edition Prerelease=
)<br><br>Configured using:<br>=C2=A0&#39;configure --with-nativecomp&#39;<b=
r><br>Configured features:<br>CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM G=
SETTINGS HARFBUZZ JPEG JSON<br>LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M=
17N_FLT MODULES NATIVE_COMP<br>NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREAD=
S TIFF TOOLKIT_SCROLL_BARS<br>X11 XDBE XIM XPM GTK3 ZLIB<br><br>Important s=
ettings:<br>=C2=A0 value of $LANG: en_US.UTF-8<br>=C2=A0 value of $XMODIFIE=
RS: @im=3Dnone<br>=C2=A0 locale-coding-system: utf-8-unix<br><br>Major mode=
: Lisp Interaction<br><br>Minor modes in effect:<br>=C2=A0 tooltip-mode: t<=
br>=C2=A0 global-eldoc-mode: t<br>=C2=A0 eldoc-mode: t<br>=C2=A0 electric-i=
ndent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 tool-bar-mode: t<br>=
=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-shadow-mode: t<br>=C2=A0 global=
-font-lock-mode: t<br>=C2=A0 font-lock-mode: t<br>=C2=A0 blink-cursor-mode:=
 t<br>=C2=A0 auto-composition-mode: t<br>=C2=A0 auto-encryption-mode: t<br>=
=C2=A0 auto-compression-mode: t<br>=C2=A0 line-number-mode: t<br>=C2=A0 tra=
nsient-mark-mode: t<br><br>Load-path shadows:<br>None found.<br><br>Feature=
s:<br>(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs=
<br>rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail<br>rmail-=
loaddefs auth-source cl-seq eieio eieio-core cl-macs<br>eieio-loaddefs pass=
word-cache json text-property-search time-date subr-x<br>mm-decode mm-bodie=
s mm-encode mail-parse rfc2231 mailabbrev gmm-utils<br>mailheader sendmail =
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr<br>mail-utils map seq byte-op=
t gv bytecomp byte-compile cconv help-fns<br>radix-tree cl-print debug back=
trace help-mode easymenu find-func<br>cl-loaddefs cl-lib iso-transl tooltip=
 eldoc electric uniquify ediff-hook<br>vc-hooks lisp-float-type mwheel term=
/x-win x-win term/common-win x-dnd<br>tool-bar dnd fontset image regexp-opt=
 fringe tabulated-list replace<br>newcomment text-mode elisp-mode lisp-mode=
 prog-mode register page<br>tab-bar menu-bar rfn-eshadow isearch timer sele=
ct scroll-bar mouse<br>jit-lock font-lock syntax facemenu font-core term/tt=
y-colors frame<br>minibuffer cl-generic cham georgian utf-8-lang misc-lang =
vietnamese<br>tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 he=
brew greek<br>romanian slovak czech european ethiopic indian cyrillic chine=
se<br>composite charscript charprop case-table epa-hook jka-cmpr-hook help<=
br>simple abbrev obarray cl-preloaded nadvice button loaddefs faces<br>cus-=
face pcase macroexp files window text-properties overlay sha1 md5<br>base64=
 format env code-pages mule custom widget hashtable-print-readable<br>backq=
uote threads dbusbind inotify lcms2 dynamic-setting<br>system-font-setting =
font-render-setting cairo move-toolbar gtk x-toolkit<br>x multi-tty make-ne=
twork-process nativecomp emacs)<br><br>Memory information:<br>((conses 16 7=
4272 8338)<br>=C2=A0(symbols 48 7113 0)<br>=C2=A0(strings 32 20890 1678)<br=
>=C2=A0(string-bytes 1 713441)<br>=C2=A0(vectors 16 13521)<br>=C2=A0(vector=
-slots 8 292167 12582)<br>=C2=A0(floats 8 25 33)<br>=C2=A0(intervals 56 238=
 0)<br>=C2=A0(buffers 992 13))<br></div>

--000000000000a31fad05be5029a4--




Acknowledgement sent to dalanicolai <dalanicolai@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#47368; 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: Fri, 26 Mar 2021 23:00:02 UTC

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