From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mbork@mbork.pl Newsgroups: gmane.emacs.help Subject: Completion with different values and displayed things Date: Sat, 16 Mar 2024 05:44:35 +0100 Message-ID: <87h6h6iy4s.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11811"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.0; emacs 30.0.50 To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 16 05:45:43 2024 Return-path: Envelope-to: geh-help-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 1rlLvS-0002p5-Pt for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 05:45:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlLug-0001Nq-LE; Sat, 16 Mar 2024 00:44:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlLud-0001N1-NN for help-gnu-emacs@gnu.org; Sat, 16 Mar 2024 00:44:52 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlLub-0007mq-Ju for help-gnu-emacs@gnu.org; Sat, 16 Mar 2024 00:44:51 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id D4EC8697B18 for ; Sat, 16 Mar 2024 05:44:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kqRs38menzBq for ; Sat, 16 Mar 2024 05:44:39 +0100 (CET) Original-Received: from localhost (unknown [89.151.31.42]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 57F1D6B683B for ; Sat, 16 Mar 2024 05:44:39 +0100 (CET) Received-SPF: pass client-ip=195.110.48.8; envelope-from=mbork@mbork.pl; helo=mail.mojserwer.eu X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146103 Archived-At: Hi all! I have a list of "things" and I need to use `completing-read' (or another completion mechanism) to enable the user to select one of them. Here's the problem. Every "thing" has, say, three things, like (:name "Thing" :description "The important thing" :id 1337) I want my completion to: - complete on :name - display also :description (there could be two different "things" with the same :name's but different :description's) - and return :id I use Ivy, but I'd prefer to make this work with any completion framework (or even with Emacs vanilla completion). Does Emacs has anything like this? More or less, I'd like an equivalent of HTML's