From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#74718: 29.4; Huge metadata with flex completion style Date: Tue, 10 Dec 2024 06:25:44 +0000 Message-ID: <875xnsvytz.fsf@posteo.net> References: <877c8bvrx3.fsf@posteo.net> <81441574-6674-4dd2-a15a-df5e3c4a859a@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37853"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thierry Volpiatto , 74718@debbugs.gnu.org, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 10 07:21:15 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 1tKtcQ-0009em-T8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Dec 2024 07:21:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKtcH-0006l0-Ks; Tue, 10 Dec 2024 01:21:05 -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 1tKtcF-0006gk-Cb for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 01:21: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 1tKtcF-0006jJ-2r for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 01:21:03 -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=AWKQCIXP5K/va6bfKja4bu/GBWnRHDf8jgXe/X4XOWE=; b=MeRJJ1NIYN/JIqPb0Fn16s/PXE6fIY987k060cENQmwLpy0Z+vF95Dj9M1rVLacTg/4/QgMnUgX6Mg16u6TuNgHcyKG5awEMEq297YEN+PzwbVQBXKPe8Tu1pF+PkmkqlWZs2Zs8BqJXIajFlcf/AlfnU6U845iMYJYKfrwIxCPgfLC2Rt7aRJF9KjXXNq8UpsyPHHeIzQ6FtCwzYQxS+Gd4FAzgTjSGP2+gYMGYIESehNf21AUcA7CXFzqzfmz/BEHY2rj+shvY2D/IhTakCl81LC+TsBohr2/YlJI4HMfNac5tiWnx1zDR1xQ9QNW0pVmiA8ssvqfTYEWA3RTEgw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKtcE-0001gz-E2 for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 01:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2024 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74718 X-GNU-PR-Package: emacs Original-Received: via spool by 74718-submit@debbugs.gnu.org id=B74718.17338116136340 (code B ref 74718); Tue, 10 Dec 2024 06:21:02 +0000 Original-Received: (at 74718) by debbugs.gnu.org; 10 Dec 2024 06:20:13 +0000 Original-Received: from localhost ([127.0.0.1]:56667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKtbQ-0001e1-EC for submit@debbugs.gnu.org; Tue, 10 Dec 2024 01:20:12 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:60311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKtbN-0001Xz-MQ for 74718@debbugs.gnu.org; Tue, 10 Dec 2024 01:20:11 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 767A6240027 for <74718@debbugs.gnu.org>; Tue, 10 Dec 2024 07:20:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1733811603; bh=XIQ4c0mrXX/Z0oBuc6WOGgxUS/m7qkRKDsNsFvC9OM4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=kzTh3zCJp3uKQyzC3MlN6cyHro4BRBxF7f3qEQl4Y3pSfKywfE5g6nR/VKAg+6Sht fRt4A3dC0DzrufHtcAcKjXrEX1e+VkQqe713+F0ShvJC3kFRFoulv8kbTyuEaCyL5S lYb7c+LHnybXM1uw4XHCG6zhNOP2+RWIflVKcYE+XyPow+PUT/dNo0jiGkeBBhOG/f UenVoP/OuVHyfXeG6HN8Z++dOG1CRnDrmzZNOZDt6VfNEGVwAiqErs6YIJR9RFyp5m bFrYSn5eUxfLlBMgmCvDp7woOJe4tKq2mGnz4WRsfpUwQKRZ0CesRqEJF07zQ+Ky4g QMnh80WC0l3Ig== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Y6pVn021jz9rxF; Tue, 10 Dec 2024 07:20:00 +0100 (CET) In-Reply-To: <81441574-6674-4dd2-a15a-df5e3c4a859a@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Dec 2024 04:27:48 +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:296734 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Dmitry, Dmitry Gutov writes: > Can you also reproduce it without Helm? Here a small recipe you can play with: From=20emacs -Q: 1) Open some buffers 2) eval this in scratch: (setq completion-styles '(flex)) (let* ((collection (mapcar #'buffer-name (buffer-list))) (metadata (completion-metadata "" collection nil)) (completion-function (lambda (str _pred _action) (let* ((comps (completion-all-completions str= collection nil (length str) metadata)) (sort-fn (completion-metadata-get metadata 'display-sort-function)) (last (last comps))) (when (cdr last) (setcdr last nil)) (message "%S" metadata) (if (and sort-fn (> (length str) 0)) (funcall sort-fn comps) comps))))) (completing-read "test: " completion-function)) Try to complete with some flex patterns e.g. "hlm" for "helm" and consult *messages* buffer. =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmdX3ugTHHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvk7YcDACyKEtin/ttdcHNoEdM+AAaOOcFtXnh HhvvV8MWPvNiHBc5I84qWW4yIkyBBLhy/TKu1Gr+wscHxOaxZNYBZJAzf8Vh2MWv WE6a4nOKQDqsWv+u7GyIAEBI8dEuFr8KSfJ8eB9IPn4YfZZmsMwJ+6RGh7OgF3vd fz2ejBdeUwH7BnJATVZ7+nCogKISOQL24cqbxHvvXQAaQmp6rs/Ihhxx4AYC01Zs x2BfH7p1plk27lwDte+z9WkIht6NueJxVApN+bEkGXoFHT/5brP5DPvJV0cFzoKW mPDUwT9P/J7dsX4b0qKlJUqMxiCMTlFJy/VDsyB407QKnQ4pNCpSc1He+jHtBF1c mxBLuvxidsFZ4RDiMi6u62Np6Cso23tZhjVn6Sth7S+b+CHkIiTP74Q5HgQp+OQf UvqglXnGjnrVOCYT/0UDJUYqpfS4BMlmYj1sIPyKQjoH2N3KwzciUkEiW15/EzSI RXiaRXMOvdlGxhBG7VJIB/+0FQHupweXWp8= =VEoS -----END PGP SIGNATURE----- --=-=-=--