From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function Date: Sat, 27 Mar 2021 10:16:35 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17172"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) Cc: 47425@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 08:19:11 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 1lQ3Dy-0004Lw-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 08:19:10 +0100 Original-Received: from localhost ([::1]:48258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQ3Dx-0001at-Qs for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 03:19:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ3Dq-0001Zf-R5 for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 03:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQ3Dq-0005tY-JT for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 03:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQ3Dq-0003X5-GG for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 03:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Mar 2021 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47425 X-GNU-PR-Package: emacs Original-Received: via spool by 47425-submit@debbugs.gnu.org id=B47425.161682949613503 (code B ref 47425); Sat, 27 Mar 2021 07:19:02 +0000 Original-Received: (at 47425) by debbugs.gnu.org; 27 Mar 2021 07:18:16 +0000 Original-Received: from localhost ([127.0.0.1]:43321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ3D6-0003Vj-6A for submit@debbugs.gnu.org; Sat, 27 Mar 2021 03:18:16 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:51829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ3D3-0003VF-FW for 47425@debbugs.gnu.org; Sat, 27 Mar 2021 03:18:13 -0400 Original-Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E1D1.00000000605EDC2F.0000789B; Sat, 27 Mar 2021 00:18:06 -0700 Content-Disposition: inline In-Reply-To: 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:203103 Archived-At: * Drew Adams [2021-03-27 01:15]: > Please consider adding a TEST comparer arg for plist keys. > > In Elisp, a plist key need not be a symbol: > > (plist-put (list "aaa" 1 "bbb" 2 "ccc" 3) "bbb" 42) > > That "works" (and no error), but it doesn't do what's expected, since > the keys should be compared with `equal' or `string=', not `eq'. > > And if it were not intended that that work then Elisp would raise a > wrong-type-argument error saying that the first arg isn't a plist. > > And note that the Elisp manual says: > > A "property list" ("plist" for short) is a list of > paired elements. Each of the pairs associates a > property name (usually a symbol) with a property or value. > ^^^^^^^ That is right, I always had that problem with plist, and still do. Amount of the coping code on my side would become redundant if that would be corrected to have a test function.