From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
rajeev.jnk@sivalik.com, 49848@debbugs.gnu.org
Subject: bug#49848: 27.2.50; map-merge plist return alist
Date: Wed, 04 Aug 2021 09:47:50 +0200 [thread overview]
Message-ID: <87pmutejmh.fsf@gnus.org> (raw)
In-Reply-To: <877dh282io.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 04 Aug 2021 01:41:35 +0100")
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> In the specific case of merging maps into a desired type, we can simply
> be more careful in such ambiguous cases. The attached patch does that,
> while also avoiding the quadratic lookup behaviour for lists.
I think that's the correct (and indeed only) solution here when dealing
with alist/plist ambiguities (if we don't want to say explicitly for
every map* call what the type actually is meant to be).
> (progn
> (require 'map)
> (map-merge-with 'list (lambda (a b) (message ">>> %s %s" a b) b)
> `((,(string ?a) . 1))
> `((,(string ?a) . 2))))
>
> In Emacs 26, it returns (("a" . 2) ("a" . 1)) without printing.
> In Emacs 27 and 28, it returns (("a" . 2)) without printing.
>
> Do we consider this a regression in Emacs 27 and try to fix it in 28
> (keeping in mind that map.el is also a GNU ELPA package)?
I think the current result value is the one that makes sense...
> Or do we drop the eql guarantee in the docstring, and call the function
> argument whenever two keys are merged, as in the attached patch?
I think that makes sense.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-08-04 7:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 19:38 bug#49848: 27.2.50; map-merge plist return alist Rajeev N via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-03 21:59 ` Michael Heerdegen
2021-08-03 22:45 ` Rajeev N via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04 0:41 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04 0:45 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04 7:47 ` Lars Ingebrigtsen [this message]
2021-08-05 2:47 ` Michael Heerdegen
2021-08-05 2:55 ` Michael Heerdegen
2021-08-05 10:48 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-14 10:35 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmutejmh.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=49848@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=michael_heerdegen@web.de \
--cc=rajeev.jnk@sivalik.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).