From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#47368: [External] : bug#47368: 28.0.50; map-elt returns nil without "deprecated" TESTFN Date: Fri, 26 Mar 2021 20:23:01 +0000 Message-ID: <87k0pty89m.fsf@tcd.ie> References: <87sg4kyw1q.fsf@tcd.ie> <87lfacvtwt.fsf@web.de> <87sg4h21m5.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Heerdegen , dalanicolai , "47368@debbugs.gnu.org" <47368@debbugs.gnu.org> To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 26 21:47:02 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPtMD-0007wA-QC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 21:47:02 +0100 Original-Received: from localhost ([::1]:41256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPtMC-0002iE-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 16:47:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPszy-0002uc-W3 for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 16:24:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPszy-00082n-C2 for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 16:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lPszy-0001qt-7z for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 16:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Mar 2021 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47368 X-GNU-PR-Package: emacs Original-Received: via spool by 47368-submit@debbugs.gnu.org id=B47368.16167901937060 (code B ref 47368); Fri, 26 Mar 2021 20:24:02 +0000 Original-Received: (at 47368) by debbugs.gnu.org; 26 Mar 2021 20:23:13 +0000 Original-Received: from localhost ([127.0.0.1]:42578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPszA-0001pn-Pl for submit@debbugs.gnu.org; Fri, 26 Mar 2021 16:23:13 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:35383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPsz7-0001pX-BZ for 47368@debbugs.gnu.org; Fri, 26 Mar 2021 16:23:11 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id j18so6825809wra.2 for <47368@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) Original-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) In-Reply-To: (Drew Adams's message of "Fri, 26 Mar 2021 20:04:44 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203077 Archived-At: Drew Adams 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