From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: sbaugh@catern.com
Cc: Spencer Baugh <sbaugh@janestreet.com>,
Eli Zaretskii <eliz@gnu.org>,
65137@debbugs.gnu.org
Subject: bug#65137: 29.1; completion-substring-try-completion doesn't return the longest common substring
Date: Tue, 29 Aug 2023 21:31:51 -0400 [thread overview]
Message-ID: <jwvh6ohz5jl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <875y5pk8rj.fsf@catern.com> (sbaugh@catern.com's message of "Tue, 08 Aug 2023 12:40:01 +0000 (UTC)")
> (completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
> -> ("b")
Right this is a bug.
(completion-pcm--merge-completions '("ab" "sab") '(prefix "b"))
returns (correctly)
("b" "a" prefix)
so
(completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
should return either ("b" "a") or ("b" "a" prefix).
Could you accompany your patch of a regression test using
`completion-pcm--merge-completions` as above?
Similarly, I see that
(completion-pcm--merge-completions '("abr" "absabr") '(prefix "br"))
returns
("br" prefix)
whereas it should arguably return
("br" "a" prefix)
[ Tho this may have the side effect that after this completion, `absabr`
won't be considered any more, if the `basic` completion comes before
`substring` :-( ]
Stefan
next prev parent reply other threads:[~2023-08-30 1:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 23:24 bug#65137: 29.1; completion-substring-try-completion doesn't return the longest common substring Spencer Baugh
2023-08-07 23:50 ` Spencer Baugh
2023-08-08 0:41 ` Spencer Baugh
2023-08-08 11:04 ` Eli Zaretskii
2023-08-08 12:40 ` sbaugh
2023-08-30 1:31 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-05 19:51 ` Spencer Baugh
2023-09-05 21:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-06 11:00 ` Eli Zaretskii
2023-08-25 0:40 ` Dmitry Gutov
2023-08-25 2:30 ` Drew Adams
2023-08-29 15:45 ` Spencer Baugh
2023-08-29 23:25 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvh6ohz5jl.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=65137@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sbaugh@catern.com \
--cc=sbaugh@janestreet.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).