From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico Date: Mon, 12 Apr 2021 16:39:29 -0700 Message-ID: <87o8ejhy32.fsf@ericabrahamsen.net> References: <9c9af088-580f-9fb1-4d79-237a74ce605c@inventati.org> <874kgkxxs0.fsf@posteo.net> <87blamp5hy.fsf@posteo.net> <2ce73f33-8675-211a-9eb7-ea63de1a161e@yandex.ru> <871rbh6pd4.fsf@posteo.net> <87sg3w6co0.fsf@posteo.net> <87pmyz4xom.fsf@posteo.net> <87mtu3sc0v.fsf@ericabrahamsen.net> <87o8ejqqdr.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28453"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Philip Kaludercic , Dmitry Gutov , "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 13 01:41:26 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lW6BJ-0007Lt-Mx for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Apr 2021 01:41:25 +0200 Original-Received: from localhost ([::1]:33720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW6BI-0002WE-O8 for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Apr 2021 19:41:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW69f-000205-GE for emacs-devel@gnu.org; Mon, 12 Apr 2021 19:39:43 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:49132 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW69c-00020d-Px for emacs-devel@gnu.org; Mon, 12 Apr 2021 19:39:43 -0400 Original-Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 77CBEFA086; Mon, 12 Apr 2021 23:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1618270775; bh=rtQ0H2OOlMlaZb4szV5WGb0LCZbgZV/wq490yoqJEIE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CKCq3OW08ADy0lQFHXICOMNyE5oZkQmS4/Cs70cvNyDcztG9i9JplToBJFpcVomIB QysXZ4VU7P25zjtcuFMNmC3UzmO3Y60yXEAe6q34o4R1FSo+HZaBEweKmPIWcUqbn+ iz6S/EEP4oks7FP4vSg0r1WLY7GL7HtbUpyMfB90= In-Reply-To: (Drew Adams's message of "Mon, 12 Apr 2021 19:21:51 +0000") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267981 Archived-At: Drew Adams writes: >> > I already mentioned that you can put the _full_ candidate >> > -- whatever Lisp object it might be -- on the _display_ >> > candidate, which is just a string. >> >> I missed that the first time around! That's an interesting approach, and >> one that hadn't occurred to me. In the simplest case it ends up being >> way, way more code than just referencing the alist again, > > Why do you think so? You have the string; you just use > `get-text-property' to get from it anything you need. > > (Not to mention that looking up a key in an alist (1) > takes time and (2) doesn't allow for duplicate keys.) I mean that using `put-text-property' on one side of the `completing-read' and `get-text-property' on the other is more code (okay, maybe I was exaggerating, but it's still more code) than building an alist on one side of the `completing-read' and then using (cdr (assoc-string on the other. There may be other advantages to the approach, but what I'd like to see is `completing-read' (or `selecting-read') doing this job itself.