GNU bug report logs - #47425
26.3; `plist-get', `plist-put' should accept a TEST function

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 26 Mar 2021 22:14:01 UTC

Severity: wishlist

Found in version 26.3

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.3; `plist-get', `plist-put' should accept a TEST function
Date: Fri, 26 Mar 2021 22:13:42 +0000
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.
                 ^^^^^^^

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19041
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





This bug report was last modified 3 years and 58 days ago.

Previous Next


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