GNU bug report logs - #55205
28.1.50; completion--replace illegally mutates completion candidates

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sun, 1 May 2022 08:29:02 UTC

Severity: normal

Found in version 28.1.50

Done: Daniel Mendler <mail <at> daniel-mendler.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, Eli Zaretskii <eliz <at> gnu.org>, 55205 <at> debbugs.gnu.org
Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates
Date: Mon, 02 May 2022 02:31:05 -0400
> I've got an imdb interface where I choose among different movies (some
> with the same name) by putting the movie poster in the completion
> string to disambiguate.  That's the first place I ran into the problem,
> years ago (and it seems like people keep trying to do things like that,
> and then giving up).

I'm a strong proponent of "different completions should be selectable by
different strings", for the kinds of reasons exposed by Daniel: it makes
it possible to use more UI styles than just selection (and it interacts
better with other things like elimination of duplicates).

But FWIW, that is not a reason to force throwing away the text
properties (IOW the act of stripping the text properties is not
a feature of the code).

E.g. I'd recommend you always include the movie's unique ID in the
completions, probably covered/hidden by the movie's poster (so the ugly
ID doesn't show up).  And when the user selects that entry it would make
a lot of sense to keep displaying the poster.

> If I remember correctly, I ended up copying most of the completion
> machinery into the package just to avoid the stripping.

We should fix the code so it's not necessary.


        Stefan





This bug report was last modified 232 days ago.

Previous Next


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