From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74865: [PATCH] Use `completion-table-with-metadata' Date: Mon, 16 Dec 2024 19:29:04 +0100 Message-ID: <87seqnh47j.fsf@daniel-mendler.de> References: <87o71eifrs.fsf@daniel-mendler.de> <874j33ebhh.fsf@mail.linkov.net> Reply-To: Daniel Mendler Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11545"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74865@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 19:32:33 2024 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 1tNFtQ-0002sO-Fi for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 19:32:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNFt7-0007aM-6s; Mon, 16 Dec 2024 13:32:13 -0500 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 1tNFsw-0007Zx-Li for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 13:32:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNFsw-0004cJ-DK for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 13:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=MuLNqyVqHLsKJHPa/wwSMeumfz6XabL55FVmjWps6hk=; b=bISPoFEsZKAvL40Ql2yM8jPjmf6OFOjkS9E4rA7mS9SsXq+XN1baWBee51hm3HRFLpUuykPV92VuDgaPI7zgwsGoeIlwU7nvORfiTpjf7IXAl7eoRt+IAsiK8oaPxR4OpQUQZrmeffad67SFz1Bsgvep1OHzjfnf0YLHleY/2GZ2uX5C2QyYn6ZM2tD9rP52ERbfMWwxFh/Ds4/D2yToZJnm8DVhtHjYjQ6yVrnbvNKIZhtYDgOfeoQy85dMQzzJO721+pqq7KKZeLybxsEWUaHbgTX5Zr9ZrRp73cQ+dFZE66Qw379m6alrdQVHpv5tRRcEncSJWEWWy+m0IxS3dQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNFsv-0001Yv-T3 for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 13:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2024 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74865-submit@debbugs.gnu.org id=B74865.17343738865943 (code B ref 74865); Mon, 16 Dec 2024 18:32:01 +0000 Original-Received: (at 74865) by debbugs.gnu.org; 16 Dec 2024 18:31:26 +0000 Original-Received: from localhost ([127.0.0.1]:56140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNFsM-0001Xn-EI for submit@debbugs.gnu.org; Mon, 16 Dec 2024 13:31:26 -0500 Original-Received: from server.qxqx.de ([49.12.34.165]:49257 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNFsI-0001XO-JI for 74865@debbugs.gnu.org; Mon, 16 Dec 2024 13:31:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MuLNqyVqHLsKJHPa/wwSMeumfz6XabL55FVmjWps6hk=; b=EURAGYSH/bZJFUxlwGOFzKKyz/ ez8AXJej+rmt4dixikqlUpH/ZD3D7NPbvjqRX/IrPL2mjlCViqD29U/0KM9Z/QuoPA+fZ/DjF2Wyy ze3PvmOQ6GX57ATaVfPNxdXShuCa8nnydEtLCramjUCA1UB1GKhiwgzuKpYux1Uz1yIA=; In-Reply-To: <874j33ebhh.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 16 Dec 2024 20:20:10 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297210 Archived-At: Juri Linkov writes: >> This is a small follow-up of bug#74616. There I have introduced the >> `completion-table-with-metadata' helper function, which we can now take >> advantage of at more places. By using `completion-table-with-metadata' >> we avoid problems with completion sessions in recursive minibuffers. > > Thanks for the patch, now pushed. Thanks! > `completion-table-with-metadata' is a very useful function. > I already used it for the new command 'comint-complete-input-ring' > in bug#74694. > > Also it could be used in `read-char-by-name' as well. Yes, there are certainly more use cases. I didn't use it for `read-char-by-name' since this would change the caching behavior slightly. The character names would be loaded a little bit earlier, which would slow down the initialization of `read-char-by-name'. My patch only changed the call sites which are exactly equivalent with and without the patch. > Maybe `completion-table-with-metadata' should be announced > in the "Lisp Changes" section of etc/NEWS? Yes, please go ahead adding it to the NEWS. I will backport the function also via Compat. Daniel