From: Thierry Volpiatto <thievol@posteo.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Thierry Volpiatto <thievol@posteo.net>,
74718@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#74718: 29.4; Huge metadata with flex completion style
Date: Tue, 10 Dec 2024 06:25:44 +0000 [thread overview]
Message-ID: <875xnsvytz.fsf@posteo.net> (raw)
In-Reply-To: <81441574-6674-4dd2-a15a-df5e3c4a859a@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Dec 2024 04:27:48 +0200")
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hi Dmitry,
Dmitry Gutov <dmitry@gutov.dev> writes:
> Can you also reproduce it without Helm?
Here a small recipe you can play with:
From emacs -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.
--
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]
next prev parent reply other threads:[~2024-12-10 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 8:06 bug#74718: 29.4; Huge metadata with flex completion style Thierry Volpiatto
2024-12-10 2:27 ` Dmitry Gutov
2024-12-10 6:25 ` Thierry Volpiatto [this message]
2024-12-10 15:24 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 5:50 ` Thierry Volpiatto
2024-12-10 21:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 5:45 ` Thierry Volpiatto
2024-12-11 23:35 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xnsvytz.fsf@posteo.net \
--to=thievol@posteo.net \
--cc=74718@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.