From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 48356@debbugs.gnu.org, Daniel Mendler <mail@daniel-mendler.de>,
JD Smith <jdtsmith@gmail.com>, Juri Linkov <juri@linkov.net>
Subject: bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary
Date: Tue, 09 Apr 2024 22:38:59 -0400 [thread overview]
Message-ID: <jwvsezu54r4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <82196eff-85e6-44da-89e4-4ead4d72e657@gutov.dev> (Dmitry Gutov's message of "Wed, 10 Apr 2024 04:33:44 +0300")
>>> ...which translates to "/" because of the double slash -- the filesystem
>>> root directory (*). But that's the same data which would be used by any
>>> other proposed solution, too.
>> More or less, tho the "ideal" solution is to do that in the
>> completion-style code, which has a bit more knowledge about it.
> Doing it in completion-style, though, would either require a relatively
> awkward change in most/all styles (e.g. the "new dynamic variable" route),
> or a more straightforward change in styles together with an incompatible
> change in completion-all-completions.
Yup, hence the quotes around "ideal".
> So on balance, would you say it's a good idea to a) use this approach in
> minibuffer-completion-help, b) create a named function for it, for other
> callers to take advantage of it as well?
Yes, while waiting for a new API it seems like a good stop gap.
> Looks like completion--merge-suffix is the helper to use.
Yup.
>> In theory this approach can "do the wrong thing" with some completion
>> styles, but AFAIK they haven't been written yet. 🙂
> So you figure that such theoretical style would return adjusted base-suffix
> in -all-completions method, not just in -try-completion?
A completion style could make use of (and list) things after the
boundary. E.g. completing a file name like
foo/ba<|>ar/baz
could decide to list all the files that match
*f*o*o*/*b*a*a*r*/*b*a*z*
in which case the "end boundary" of the `completion-all-completions`
output should not be the `cdr` of the `completion-boundaries`.
I wouldn't worry about it, tho.
Stefan
next prev parent reply other threads:[~2024-04-10 2:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 17:23 bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary Daniel Mendler
2022-03-13 17:56 ` Juri Linkov
2022-03-13 20:35 ` bug#48356: [External] : " Drew Adams
2022-03-14 3:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-14 18:53 ` Juri Linkov
2022-03-14 20:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-15 2:14 ` Daniel Mendler
2022-03-15 7:53 ` Juri Linkov
2022-03-20 20:34 ` Juri Linkov
2024-04-08 21:59 ` Dmitry Gutov
2024-04-08 22:27 ` Dmitry Gutov
2024-04-08 23:50 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-10 1:33 ` Dmitry Gutov
2024-04-10 2:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-04-11 1:00 ` Dmitry Gutov
2024-04-11 6:55 ` Eli Zaretskii
2024-04-11 10:36 ` Dmitry Gutov
2024-04-11 21:59 ` Dmitry Gutov
2024-04-14 16:44 ` Juri Linkov
2024-04-14 23:55 ` Dmitry Gutov
2024-04-18 14:25 ` Spencer Baugh
2024-04-20 0:12 ` Dmitry Gutov
2024-05-04 2:23 ` Dmitry Gutov
2024-05-09 2:33 ` Dmitry Gutov
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=jwvsezu54r4.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=48356@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=jdtsmith@gmail.com \
--cc=juri@linkov.net \
--cc=mail@daniel-mendler.de \
--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.