From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates Date: Mon, 02 May 2022 02:31:05 -0400 Message-ID: References: <4d1b8687-20f2-137a-2739-7bba28828991@daniel-mendler.de> <87wnf5mpt4.fsf@gnus.org> <87k0b5duzh.fsf@gnus.org> <8735htdrmt.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Daniel Mendler , Eli Zaretskii , 55205@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 02 08:32:21 2022 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 1nlPbZ-0007p9-5B for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 08:32:21 +0200 Original-Received: from localhost ([::1]:55492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlPbX-00083M-Ds for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 02:32:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlPbG-0007w5-3g for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 02:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlPbF-0006Dp-PA for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 02:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlPbF-0003Kq-KA for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 02:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2022 06:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55205 X-GNU-PR-Package: emacs Original-Received: via spool by 55205-submit@debbugs.gnu.org id=B55205.165147307512764 (code B ref 55205); Mon, 02 May 2022 06:32:01 +0000 Original-Received: (at 55205) by debbugs.gnu.org; 2 May 2022 06:31:15 +0000 Original-Received: from localhost ([127.0.0.1]:34676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlPaV-0003Jn-KL for submit@debbugs.gnu.org; Mon, 02 May 2022 02:31:15 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlPaU-0003Jc-K6 for 55205@debbugs.gnu.org; Mon, 02 May 2022 02:31:15 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0F3AA8049E; Mon, 2 May 2022 02:31:09 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E8959803D6; Mon, 2 May 2022 02:31:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651473066; bh=OyrRruXjmM8u3maekAarK1MDmRd7tDBYzDeCLHv/YHQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IUh52yaVTJiuHcQioeyoCOjj/y2XdaIR5WdClXDmcYKocoZ3wK+p9PLsubYUkBQ/B y2Ah/5O+LgYLcGP9Se8jTuWdlZcwax2vuM4GmjL6ngBGYyqyoTRdatQynLKmUVzhL9 e+pjFnCVE7fXF59WL6w5B3EyySTPsPfYDFiBkNKGWv7j+ljTMDVQ3S/gKdPTp5gSwb XbOt4GVqQf2KLli/uCoapcik6DnEIrfeX6BUGgRVz0HaCKCCFOh0cd3civXdlCX4Te tvF2p3Es5qT9X0yc9oa0JJHCUZMs6oSZ8IpY0CTf9Ipw30bozMzUOHaaIoNRVvJPN8 RPfVIlZ2PsLUQ== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ABCE01201E1; Mon, 2 May 2022 02:31:06 -0400 (EDT) In-Reply-To: <8735htdrmt.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 01 May 2022 20:39:22 +0200") 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:231225 Archived-At: > 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